Install requirements in Dockerfile from requirements.txt
This commit is contained in:
parent
2c7303a561
commit
c256a1f7c5
19
Dockerfile
19
Dockerfile
|
@ -2,19 +2,14 @@ FROM python:3.6-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV BUILD_LIST git
|
# Install dependencies.
|
||||||
|
ADD requirements.txt /app
|
||||||
|
RUN cd /app && \
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
COPY Pipfile /app
|
# Add actual source code.
|
||||||
|
ADD blockchain.py /app
|
||||||
RUN apk add --update $BUILD_LIST \
|
|
||||||
&& pip install pipenv \
|
|
||||||
&& pipenv --python=python3.6 \
|
|
||||||
&& pipenv install \
|
|
||||||
&& apk del $BUILD_LIST \
|
|
||||||
&& rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
COPY blockchain.py /app
|
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
ENTRYPOINT [ "pipenv", "run", "python", "/app/blockchain.py", "--port", "5000" ]
|
CMD ["python", "blockchain.py", "--port", "5000"]
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
flask==0.12.2
|
||||||
|
requests==2.18.4
|
Loading…
Reference in New Issue