-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (29 loc) · 823 Bytes
/
Dockerfile
File metadata and controls
37 lines (29 loc) · 823 Bytes
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
34
35
36
37
FROM python:3.8-alpine
ENV PYTHONUNBUFFERED 1
# EXPOSE $APP_PORT
WORKDIR /app
RUN set -e; \
apk add --no-cache --virtual .build-deps \
gcc \
libc-dev \
linux-headers \
mysql-dev \
python3-dev \
libffi-dev \
openssl-dev \
;
RUN apk add build-base
RUN /usr/local/bin/python -m pip install --upgrade pip
COPY . ./
CMD ["mysql"]
CMD pip install alembic
CMD ["alembic","upgrade","head"]
# command to run on container start
CMD pip install -r requirements.txt && \
pip install mysql-connector && \
pip install alembic && \
pip install pydantic[dotenv] && \
pip install mysqlclient && \
pip install passlib && \
PYTHONPATH=. alembic upgrade head && \
python main.py