Skip to content

Commit 6521b13

Browse files
authored
Added non-root user for container. (#390)
1 parent d7ff20b commit 6521b13

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
9+
## [UNRELEASED]
10+
11+
* changed container images to use non-root `user`
12+
813
## [v0.9.8]
14+
915
### Fixed
1016
- Allow array as q parameter for full text search
1117

docker/pypgstac/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ COPY src/pypgstac /opt/src/pypgstac
2828
COPY src/pgstac /opt/src/pgstac
2929
WORKDIR /opt/src/pypgstac
3030
RUN uv pip install --system -e . && rm -rf /usr/local/cargo/registry
31+
32+
RUN addgroup --gid 1000 user && \
33+
adduser --uid 1000 --gid 1000 --disabled-password --gecos "" --home /home/user user && \
34+
chown -R user:user /opt/src/pypgstac /opt/src/pgstac
35+
USER user

0 commit comments

Comments
 (0)