1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-26 10:43:35 +02:00

Update Dockerfile

Signed-off-by: techopsmasters <163403479+techopsmasters@users.noreply.github.com>
This commit is contained in:
techopsmasters 2024-05-13 19:26:01 +05:30 committed by GitHub
parent 8ab62f797a
commit 39a3b4a318
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,13 +4,13 @@ FROM python:3.9.2-alpine
RUN pip install --upgrade pip
# get curl for healthchecks
RUN apk add curl
RUN apt add curl
# permissions and nonroot user for tightened security
RUN adduser -D nonroot
RUN mkdir /home/app/ && chown -R nonroot:nonroot /home/app
RUN mkdir -p /var/log/flask-app && touch /var/log/flask-app/flask-app.err.log && touch /var/log/flask-app/flask-app.out.log
RUN chown -R nonroot:nonroot /var/log/flask-app
RUN adduser -D nonroot && \
mkdir /home/app/ && chown -R nonroot:nonroot /home/app && \
mkdir -p /var/log/flask-app && touch /var/log/flask-app/flask-app.err.log && touch /var/log/flask-app/flask-app.out.log && \
chown -R nonroot:nonroot /var/log/flask-app
WORKDIR /home/app
USER nonroot
@ -29,4 +29,4 @@ RUN pip install -r requirements.txt
# define the port number the container should expose
EXPOSE 5000
CMD ["python", "app.py"]
CMD ["python", "app.py"]