Skip to content

Commit

Permalink
Add non-root user
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyRae committed Aug 13, 2024
1 parent 9bf399e commit e7f05b5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM alpine:latest

RUN addgroup -S appgroup && adduser -S appuser -G appgroup
RUN apk --no-cache add bash postgresql-client wait4x

LABEL org.opencontainers.image.source=https://github.com/AndyRae/omop-lite
LABEL org.opencontainers.image.description="A small container to get an OMOP CDM Vocabulary Postgres database running quickly."
LABEL org.opencontainers.image.licenses=MIT
USER appuser

# Set environment variables
ENV DB_HOST="db"
Expand All @@ -16,8 +15,8 @@ ENV SCHEMA_NAME="omop"
ENV VOCAB_DATA_DIR="vocabs"

# Copy files
COPY scripts /scripts
COPY setup.sh /setup.sh
COPY --chown=appuser:appgroup scripts /scripts
COPY --chown=appuser:appgroup setup.sh /setup.sh
RUN chmod +x /setup.sh

# Set entrypoint
Expand Down

0 comments on commit e7f05b5

Please sign in to comment.