diff --git a/.dockerignore b/.dockerignore index cec1b017..0bb79a03 100644 --- a/.dockerignore +++ b/.dockerignore @@ -25,3 +25,4 @@ _data/ .env.local flagr.sqlite ./browser/flagr-ui/node_modules +Dockerfile diff --git a/Dockerfile b/Dockerfile index 28146455..00e7baa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,5 +34,8 @@ COPY --from=npm_builder /go/src/github.com/openflagr/flagr/browser/flagr-ui/dist ADD ./buildscripts ./buildscripts ADD ./buildscripts/demo_sqlite3.db /data/demo_sqlite3.db +RUN addgroup -S appgroup && adduser -S appuser -G appgroup +USER appuser + EXPOSE 18000 CMD ./flagr diff --git a/integration_tests/Dockerfile-Integration-Test b/integration_tests/Dockerfile-Integration-Test index a5669773..0cc4b194 100644 --- a/integration_tests/Dockerfile-Integration-Test +++ b/integration_tests/Dockerfile-Integration-Test @@ -18,5 +18,7 @@ ENV HOST=0.0.0.0 ENV PORT=18000 ENV FLAGR_DB_DBDRIVER=sqlite3 ENV FLAGR_RECORDER_ENABLED=false +RUN addgroup -S appgroup && adduser -S appuser -G appgroup +USER appuser EXPOSE 18000 CMD ./flagr