mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
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.
This commit is contained in:
+11
-11
@@ -1,24 +1,24 @@
|
||||
FROM python:3.6.2
|
||||
FROM python:3.6.3
|
||||
|
||||
# -- Install Pipenv:
|
||||
RUN pip install pipenv --upgrade
|
||||
RUN set -ex && pip install pipenv --upgrade
|
||||
|
||||
# -- Install Application into container:
|
||||
RUN mkdir /app
|
||||
RUN set -ex && mkdir /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# -- Adding Pipfiles
|
||||
ONBUILD COPY Pipfile Pipfile
|
||||
ONBUILD COPY Pipfile.lock Pipfile.lock
|
||||
|
||||
# -- Install dependencies:
|
||||
ONBUILD RUN set -ex && pipenv install --deploy --system
|
||||
|
||||
# --------------------
|
||||
# - Using This File: -
|
||||
# --------------------
|
||||
|
||||
# FROM kennethreitz/pipenv
|
||||
|
||||
# COPY Pipfile Pipfile
|
||||
# COPY Pipfile.lock Pipfile.lock
|
||||
# COPY . /app
|
||||
|
||||
# -- Install dependencies:
|
||||
# RUN pipenv install --deploy --system
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD [ "/bin/bash" ]
|
||||
Reference in New Issue
Block a user