diff --git a/Dockerfile b/Dockerfile index 8f3df9b..82de324 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,19 +2,14 @@ FROM python:3.6-alpine WORKDIR /app -ENV BUILD_LIST git +# Install dependencies. +ADD requirements.txt /app +RUN cd /app && \ + pip install -r requirements.txt -COPY Pipfile /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 +# Add actual source code. +ADD blockchain.py /app EXPOSE 5000 -ENTRYPOINT [ "pipenv", "run", "python", "/app/blockchain.py", "--port", "5000" ] +CMD ["python", "blockchain.py", "--port", "5000"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..990b2d8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +flask==0.12.2 +requests==2.18.4