feat:add Dockerfile for containerization

main
Hmily 10 months ago committed by GitHub
parent 7d4ed9238c
commit a26af44f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,20 @@
FROM python:3.10
WORKDIR /app
COPY . /app
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8000
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libgl1-mesa-glx \
tzdata && \
ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
CMD ["python", "app.py"]
Loading…
Cancel
Save