Skip to content

Commit 8891fdc

Browse files
committed
Switch to non root user
1 parent 7b8a8ee commit 8891fdc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎Dockerfile‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ ADD registration_api /usr/local/lib/python3.12/dist-packages/registration_api
5252
# Install pygeoapi
5353
RUN python3 -m venv --system-site-packages /venv \
5454
&& /venv/bin/python3 -m pip install --no-cache-dir -r requirements.txt \
55-
&& chmod -R g=u /pygeoapi
55+
&& chmod -R g=u /pygeoapi \
56+
&& chown -R ubuntu /pygeoapi \
57+
&& mkdir -p /openapi \
58+
&& chmod -R g=u /openapi \
59+
&& chown -R ubuntu /openapi
60+
61+
USER ubuntu
5662

5763
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)