Alpine based docker image.
This commit is contained in:
parent
ae7a24f3ea
commit
70fcc42a6b
@ -1,8 +1,12 @@
|
|||||||
FROM python:3
|
FROM python:alpine
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
RUN apk add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++
|
||||||
|
|
||||||
COPY requirements.txt ./
|
COPY requirements.txt ./
|
||||||
|
|
||||||
|
RUN pip install wheel cryptography gunicorn pymysql
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
@ -11,5 +15,5 @@ RUN flask db init \
|
|||||||
&& flask db migrate\
|
&& flask db migrate\
|
||||||
&& flask db upgrade
|
&& flask db upgrade
|
||||||
|
|
||||||
CMD [ "flask", "run", "--host", "0.0.0.0" ]
|
CMD [ "gunicorn", "-b", "0.0.0.0:5000", "-w", "4", "yotter:app" ]
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
Reference in New Issue
Block a user