ghusta / docker-postgres-world-db

Example Database for PostgreSQL : World DB
40 stars 33 forks source link

Rootless container #46

Open ghusta opened 1 year ago

ghusta commented 1 year ago
ghusta commented 2 months ago

Example (with docker init) :

# Create a non-privileged user that the app will run under.
# See https://docs.docker.com/go/dockerfile-user-best-practices/
ARG UID=10001
RUN adduser \
    --disabled-password \
    --gecos "" \
    --home "/nonexistent" \
    --shell "/sbin/nologin" \
    --no-create-home \
    --uid "${UID}" \
    appuser
USER appuser