Skip to content

Commit 20ee4de

Browse files
committed
Uses ONBUILD in Dockerfile to install deps while building
Copies `Pipfile` and `Pipefile.lock`, installs deps on building a docker image using the official pipenv image.
1 parent e6cf850 commit 20ee4de

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Dockerfile

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
FROM python:3.6.2
1+
FROM python:3.6.3
22

33
# -- Install Pipenv:
4-
RUN pip install pipenv --upgrade
4+
RUN set -ex && pip install pipenv --upgrade
55

66
# -- Install Application into container:
7-
RUN mkdir /app
7+
RUN set -ex && mkdir /app
8+
89
WORKDIR /app
910

11+
# -- Adding Pipfiles
12+
ONBUILD COPY Pipfile Pipfile
13+
ONBUILD COPY Pipfile.lock Pipfile.lock
14+
15+
# -- Install dependencies:
16+
ONBUILD RUN set -ex && pipenv install --deploy --system
17+
1018
# --------------------
1119
# - Using This File: -
1220
# --------------------
1321

1422
# FROM kennethreitz/pipenv
1523

16-
# COPY Pipfile Pipfile
17-
# COPY Pipfile.lock Pipfile.lock
1824
# COPY . /app
19-
20-
# -- Install dependencies:
21-
# RUN pipenv install --deploy --system
22-
23-
ENTRYPOINT []
24-
CMD [ "/bin/bash" ]

0 commit comments

Comments
 (0)