ご案内_AWS CloudTech
インフラ基礎講座
準備
AWS基礎_主要サービス
冗長化とスケーラビリティ
DNSと障害対策
HTTPSとキャッシュ
AWS CLI
Infrastructure as Code(IaC)
コラム
Docker

【Docker講座9】Dockerfileデモ2【10:14】

# Test stage
FROM alpine AS test
LABEL application=todobackend

# Install basic utilities
RUN apk add --no-cache bash git

# Install build dependencies
RUN apk add --no-cache gcc python3-dev py3-pip libffi-dev musl-dev linux-headers mariadb-dev
RUN pip3 install wheel -U

# Copy requirements
COPY /src/requirements* /build/
WORKDIR /build

# Build and install requirements
RUN pip3 wheel -r requirements_test.txt --no-cache-dir --no-input
RUN pip3 install -r requirements_test.txt -f /build --no-index --no-cache-dir
■コマンド
docker build -t myimage1 .

docker history xxxxx

docker run -it xxxxx /bin/bash

exit