We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9306346 commit 3611303Copy full SHA for 3611303
1 file changed
Dockerfile
@@ -1,4 +1,4 @@
1
-FROM golang:bullseye AS build
+FROM golang:bullseye AS builder
2
3
COPY . .
4
COPY .docker/entrypoint.sh /entrypoint.sh
@@ -10,8 +10,17 @@ ENV VERSION=docker
10
RUN make build
11
RUN make build-plugins
12
13
-RUN cp ./bin/druid* /usr/bin/
+# The binaries are in ./bin/ directory after build
14
15
+# Second stage: minimal runtime image
16
+FROM debian:bullseye-slim
17
+
18
+# Copy only the built binaries and entrypoint from builder
19
+COPY --from=builder /go/bin/druid* /usr/bin/
20
+COPY --from=builder /entrypoint.sh /entrypoint.sh
21
+RUN chmod +x /entrypoint.sh
22
23
+# Set up user with the same UID/GID
24
ARG UID=1000
25
ARG GID=1000
26
RUN groupadd -g $GID -o druid
0 commit comments