-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (26 loc) · 888 Bytes
/
Dockerfile
File metadata and controls
38 lines (26 loc) · 888 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
38
# # Pull the image from Dockerhub
# FROM python:alpine3.19
# # 필요한 패키지 설치
# RUN apk add --no-cache gcc musl-dev mariadb-dev pkgconfig
# WORKDIR /src
# # set up python environment variables
# ENV PYTHONDOWNWRITEBYTECODE 1
# ENV PYTHONNUNBUFFER 1
# # update and install dependencies
# RUN pip install --upgrade pip
# COPY ./requirements.txt /api/requirements.txt
# RUN pip install -r /api/requirements.txt
# # copy project
# COPY . .
# # Expose the port server is running on
# EXPOSE 8000
FROM python:3.10.0-alpine
ENV PYTHONUNBUFFERED 1
RUN mkdir /app
WORKDIR /app
# dependencies for psycopg2-binary
RUN apk add --no-cache mariadb-connector-c-dev libffi-dev gcc musl-dev
RUN apk update && apk add python3 python3-dev mariadb-dev build-base && pip3 install mysqlclient
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
COPY . /app/