cr-connect-workflow/Dockerfile

24 lines
553 B
Docker
Raw Normal View History

2020-05-20 20:49:32 +00:00
FROM python:3.6.9-slim
WORKDIR /app
2020-05-20 19:57:54 +00:00
COPY Pipfile Pipfile.lock /app/
RUN pip install pipenv && \
apt-get update && \
2020-05-20 19:04:41 +00:00
apt-get install -y --no-install-recommends \
gcc python3-dev libssl-dev postgresql-client git-core && \
2020-05-20 19:57:54 +00:00
pipenv install --dev && \
apt-get remove -y gcc python3-dev libssl-dev && \
2020-05-20 19:04:41 +00:00
apt-get purge -y --auto-remove && \
rm -rf /var/lib/apt/lists/ *
2020-05-20 19:57:54 +00:00
COPY . /app/
2020-05-20 19:17:03 +00:00
ENV FLASK_APP=/app/crc/__init__.py
2020-05-20 19:57:54 +00:00
CMD ["pipenv", "run", "flask", "db", "upgrade"]
2020-05-20 19:17:03 +00:00
CMD ["pipenv", "run", "python", "/app/run.py"]
# expose ports
EXPOSE 5000