Spaces:
Runtime error
Runtime error
File size: 938 Bytes
d5f57d0 c1f243e cfde914 c1f243e d5f57d0 809aec4 d5f57d0 288bbb3 5902f65 288bbb3 d5f57d0 |
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 |
# Use the official Python 3.10 image as the base image
FROM python:3.10
# install Git (if it's not already installed)
RUN apt-get update && apt-get install -y git
# allow permissions
RUN chmod 777 -R /root
# force docker to rebuild from this step if version.json changes
ADD http://worldtimeapi.org/api/timezone/Asia/Jakarta version.json
# set timezone jakarta
ENV TZ=Asia/Jakarta
# git clone from private repo
RUN --mount=type=secret,id=GIT_REPO,mode=0444,required=true git clone $(cat /run/secrets/GIT_REPO) /app
# set working directory
WORKDIR /app
# install packages from packages.txt (apt-get install) using xargs
RUN xargs apt-get -y install < packages.txt
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# copy README.txt to /root
RUN cp README.txt /root
# Set the command to run when the container starts
# This command will start the Flask application
CMD ["python", "src/app.py"]
|