-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (22 loc) · 814 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM python:3.7-slim
ENV MICRO_SERVICE=/home/app/microservice
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
ENV YOUR_ENV=development
RUN mkdir -p $MICRO_SERVICE
# RUN mkdir -p $MICRO_SERVICE/server/static
# where the code lives
WORKDIR $MICRO_SERVICE
# install dependencies
RUN pip install --upgrade pip
RUN pip install poetry
# copy project
COPY poetry.lock pyproject.toml ${MICRO_SERVICE}/
# Project initialization:
RUN poetry config virtualenvs.create false \
&& poetry install $(test "$YOUR_ENV" == production && echo "--no-dev") --no-interaction --no-ansi
COPY . ${MICRO_SERVICE}
# COPY ./entrypoint.sh $MICRO_SERVICE
# CMD ["/bin/bash", "/home/app/microservice/entrypoint.sh"]