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:
parent
8ab62f797a
commit
39a3b4a318
1 changed files with 6 additions and 6 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue