-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbase.Dockerfile
38 lines (30 loc) · 1.08 KB
/
base.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.8-alpine
# -- timezone sync
RUN set -ex && apk update \
&& apk add tzdata \
&& cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime \
&& echo "Asia/Seoul" > /etc/timezone \
&& apk del tzdata
# build-base: gevent dependency
# libffi-dev: bcrypt dependency
RUN set -ex && apk update \
&& apk add build-base libffi-dev libressl-dev openssl-dev musl-dev\
&& rm -rf /var/cache/apk/*
# centos7에서 pip upgrade 중 EnvironmentError [Errno 39] “Directory not empty” 발생
# RUN set -ex \
# && pip3 install --upgrade pip
# && pip3 install pipenv
RUN mkdir /code
WORKDIR /code
# -- add dependency list for pipenv
# ONBUILD COPY Pipfile Pipfile
# ONBUILD COPY Pipfile.lock Pipfile.lock
# -- create .venv in WORKDIR
# ENV PIPENV_VENV_IN_PROJECT=.
# ONBUILD RUN set -ex && pipenv sync --dev
# -- install dependency with pip
ONBUILD COPY requirements.txt requirements.txt
ONBUILD RUN set -ex & pip install -r requirements.txt
ONBUILD RUN apk del build-base libffi-dev libressl-dev openssl-dev musl-dev
# -- Install Application into container:
ONBUILD COPY src src