Skip to content

Commit

Permalink
Updating Dockerfile based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyd450 committed Nov 30, 2023
1 parent dc5a95b commit 5a5d605
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ENV GOPATH=$APP_ROOT

WORKDIR $APP_ROOT/src/
ADD go.mod go.sum $APP_ROOT/src/
RUN go mod download

# Add source code
ADD ./cmd/ $APP_ROOT/src/cmd/
Expand All @@ -36,12 +35,4 @@ FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.21 as dep
COPY --from=builder /opt/app-root/src/timestamp-server /usr/local/bin/timestamp-server

# Set the binary as the entrypoint of the container
CMD ["timestamp-server", "serve"]

# debug compile options & debugger
FROM deploy as debug

RUN go install -mod=mod github.com/go-delve/delve/cmd/[email protected]

# overwrite server and include debugger
COPY --from=builder /opt/app-root/src/timestamp-server_debug /usr/local/bin/timestamp-server
CMD ["timestamp-server", "serve"]

0 comments on commit 5a5d605

Please sign in to comment.