Skip to content

Commit 1dc5f53

Browse files
author
marcel
committed
create non root user
1 parent a34b386 commit 1dc5f53

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ RUN go build -o waitfor
1010

1111
# Runner
1212
FROM alpine:3.22.1
13+
14+
# Create a non-root user "app" to run the application
15+
RUN addgroup -S app && adduser -S app -G app
16+
1317
COPY --from=builder /app/waitfor /usr/local/bin/waitfor
1418

19+
USER app
20+
1521
ENTRYPOINT ["waitfor"]

0 commit comments

Comments
 (0)