File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,26 @@ RUN apk add --no-cache gcc libstdc++-dev libc-dev
18
18
RUN cd /gnfd-qa-test-monitor \
19
19
&& go build -o ./build/monitor main.go
20
20
21
- RUN cd /gnfd-qa-test-monitor && pwd && ls -al
21
+ RUN cd /gnfd-qa-test-monitor/build && pwd && ls -al
22
22
23
23
FROM alpine:3.17
24
24
25
- USER nonroot:nonroot
26
- WORKDIR /home/nonroot
27
- # COPY --from=builder --chown=nonroot:nonroot /gnfd-qa-test-monitor/build/monitor $WORKDIR
28
- COPY --from=builder /gnfd-qa-test-monitor/build/monitor $WORKDIR
25
+ ARG USER=sp
26
+ ARG USER_UID=1000
27
+ ARG USER_GID=1000
28
+
29
+ ENV WORKDIR=/app
30
+
31
+ WORKDIR ${WORKDIR}
32
+
33
+ COPY --from=builder /gnfd-qa-test-monitor/build/* ${WORKDIR}/
34
+ RUN chown -R ${USER_UID}:${USER_GID} ${WORKDIR}
35
+ USER ${USER_UID}:${USER_GID}
29
36
RUN cd /gnfd-qa-test-monitor && pwd && ls -al
30
- ENTRYPOINT ["./monitor"]
37
+ ENTRYPOINT ["/app/monitor"]
38
+
39
+ # USER nonroot:nonroot
40
+ # WORKDIR /home/nonroot
41
+ # COPY --from=builder --chown=nonroot:nonroot /gnfd-qa-test-monitor/build/monitor $WORKDIR
42
+ # RUN cd /gnfd-qa-test-monitor && pwd && ls -al
43
+ # ENTRYPOINT ["./monitor"]
You can’t perform that action at this time.
0 commit comments