Skip to content

Commit

Permalink
[goreleaser] fix: update docker build context and simplify build process
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] and trajan0x committed Dec 14, 2024
1 parent de40af8 commit ce76957
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docker/golang-ci-lint.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

FROM golang:1.21-alpine AS builder

WORKDIR /app
COPY . .
RUN cd contrib/golang-ci-lint && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -o /app/bin/golang-ci-lint \
WORKDIR /build
COPY contrib/golang-ci-lint/ .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -o /build/bin/golang-ci-lint \
-ldflags="-s -w -extldflags '-static'" \
-tags netgo,osusergo \
-trimpath
Expand All @@ -20,7 +19,7 @@ LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.vendor="Synapse Labs"
LABEL org.opencontainers.image.documentation="https://github.com/synapsecns/sanguine/tree/master/contrib/golang-ci-lint"

COPY --from=builder /app/bin/golang-ci-lint /usr/local/bin/
COPY --from=builder /build/bin/golang-ci-lint /usr/local/bin/
RUN chmod +x /usr/local/bin/golang-ci-lint

ENTRYPOINT ["/usr/local/bin/golang-ci-lint"]

0 comments on commit ce76957

Please sign in to comment.