Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Dockerfile 추가 #2

Closed
0xd669 opened this issue Feb 13, 2019 · 2 comments
Closed

Dockerfile 추가 #2

0xd669 opened this issue Feb 13, 2019 · 2 comments
Labels
Type: Good First Issue Good for newcomers

Comments

@0xd669
Copy link
Member

0xd669 commented Feb 13, 2019

package/__main__.py을 실행시키는 간단한 Dockerfile을 추가하면 좋을 것 같습니다.

@0xd669 0xd669 added the Type: Good First Issue Good for newcomers label Feb 13, 2019
@winterjung
Copy link
Contributor

멀티 스테이지 빌드 옵션 추가하면 좋겠네용 일단 멀티스테이지 기준 베이스 도커파일 적어두겠습니다.

FROM python:3.7.2-alpine3.8 AS base

RUN pip install -U pip

# Build stage
FROM base AS builder

RUN apk update && \
    apk add --no-cache --upgrade \
            build-base \
            gcc

WORKDIR /wheels

COPY requirements.txt .

RUN pip wheel -r requirements.txt

# Production stage
FROM base

LABEL maintainer="author name <author@email>"

ENV PYTHONUNBUFFERED=1

COPY --from=builder /wheels /wheels

RUN pip install -r /wheels/requirements.txt -f /wheels && \
    rm -rf /wheels && \
    rm -rf /root/.cache/pip/*

WORKDIR /app

COPY package package

ENTRYPOINT ["python"]
CMD ["-m", "package"]

@0xd669 0xd669 added this to the 0.0.1 (public release) milestone Feb 13, 2019
0xd669 added a commit that referenced this issue Feb 13, 2019
Signed-off-by: Sunghyun Hwang <me@sunghyunzz.com>

#2
@0xd669
Copy link
Member Author

0xd669 commented Feb 13, 2019

#8 통해 추가 완료했습니다 👍

@0xd669 0xd669 closed this as completed Feb 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Good First Issue Good for newcomers
Development

No branches or pull requests

2 participants