Skip to content

Commit 4e2ec6a

Browse files
committed
Added non-root user for container.
1 parent 6c3bf25 commit 4e2ec6a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Release Notes
22

3-
## Unreleased
3+
## Unreleased
44

55
* remove `cql-text` support for PgSTACSearch `filter`
66
* add `filter` and `filter-lang` for CollectionIdParams dependency
7+
* changed container image to use non-root `user`
78

89
## 1.9.0 (2025-09-23)
910

@@ -12,7 +13,7 @@
1213
* add OpenTelemetry instrumentation to the tiler factory classes
1314
* fix layer's bounds for non-wgs84 CRS in WMTS document
1415
* refactor HTML templating
15-
* remove python 3.9 support
16+
* remove python 3.9 support
1617

1718
* switch from bitnami to official python:3.12 docker image
1819

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ COPY LICENSE LICENSE
2626
RUN python -m pip install --no-cache-dir --upgrade .["psycopg-binary"]
2727
RUN rm -rf titiler/ pyproject.toml README.md LICENSE
2828

29+
RUN groupadd -g 1000 user && \
30+
useradd -u 1000 -g user -s /bin/bash -m user
31+
32+
USER user
33+
2934
###################################################
3035
# For compatibility (might be removed at one point)
3136
ENV MODULE_NAME=titiler.pgstac.main
3237
ENV VARIABLE_NAME=app
3338
ENV HOST=0.0.0.0
3439
ENV PORT=80
3540
ENV WEB_CONCURRENCY=1
41+
3642
CMD gunicorn -k uvicorn.workers.UvicornWorker ${MODULE_NAME}:${VARIABLE_NAME} --bind ${HOST}:${PORT} --workers ${WEB_CONCURRENCY}

0 commit comments

Comments
 (0)