Skip to content

Commit

Permalink
added parameters to go build
Browse files Browse the repository at this point in the history
  • Loading branch information
mosajjal committed Feb 3, 2025
1 parent 42c0f29 commit 2d78412
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ RUN apk add --no-cache libcap-static libpcap-dev linux-headers git go file --rep

RUN git clone https://${REPO}.git /opt/dnsmonster --depth 1 \
&& cd /opt/dnsmonster \
&& git fetch --tags \
&& git fetch --tags \
&& export LATEST_TAG=`git describe --tags --always` \
&& go build --ldflags "-L /usr/lib/libcap.a -linkmode external -X ${REPO}/util.releaseVersion=${LATEST_TAG} -extldflags \"-static\"" ./cmd/dnsmonster
&& GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build --ldflags "-L /usr/lib/libcap.a -linkmode external -X ${REPO}/util.releaseVersion=${LATEST_TAG} -extldflags \"-static\"" ./cmd/dnsmonster

FROM scratch
COPY --from=0 /opt/dnsmonster/dnsmonster /dnsmonster
ENTRYPOINT ["/dnsmonster"]
ENTRYPOINT ["/dnsmonster"]

0 comments on commit 2d78412

Please sign in to comment.