Skip to content

Commit 6406b10

Browse files
authored
Added non-root user for container. (#11)
1 parent ea86027 commit 6406b10

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ COPY runtimes/ /tmp/runtimes
2020
RUN python -m pip install /tmp/runtimes --no-cache-dir --upgrade
2121
RUN rm -rf /tmp/runtimes
2222

23+
RUN groupadd -g 1000 user && \
24+
useradd -u 1000 -g user -s /bin/bash -m user
25+
26+
USER user
27+
2328
ENV HOST 0.0.0.0
2429
ENV PORT 80
30+
2531
CMD uvicorn titiler_md_demo.main:app --host ${HOST} --port ${PORT}

0 commit comments

Comments
 (0)