Skip to content

Commit

Permalink
Fix: docker file not picking up command arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Jun 1, 2023
1 parent d1d09d8 commit 54e8683
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions cmd/ssl-vision-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ FROM golang:1.20-alpine AS build_go
ARG cmd=ssl-vision-cli
WORKDIR work
COPY . .
RUN go install -v ./cmd/${cmd}
RUN go install ./cmd/${cmd}

# Start fresh from a smaller image
FROM alpine:3
ARG cmd=ssl-vision-cli
COPY --from=build_go /go/bin/${cmd} /app/${cmd}
COPY --from=build_go /go/bin/${cmd} /app
USER 1000
ENV COMMAND="/app/${cmd}"
ENTRYPOINT "${COMMAND}"
ENTRYPOINT ["/app"]
CMD []
5 changes: 2 additions & 3 deletions cmd/ssl-vision-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ RUN go install ./cmd/${cmd}
# Start fresh from a smaller image
FROM alpine:3
ARG cmd=ssl-vision-client
COPY --from=build_go /go/bin/${cmd} /app/${cmd}
COPY --from=build_go /go/bin/${cmd} /app
USER 1000
ENV COMMAND="/app/${cmd}"
ENTRYPOINT "${COMMAND}"
ENTRYPOINT ["/app"]
CMD []

0 comments on commit 54e8683

Please sign in to comment.