Skip to content

Commit

Permalink
dockerfile now has versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mosajjal committed May 29, 2021
1 parent d96dfbe commit 01ed8fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ RUN apk add --no-cache libcap-static libpcap-dev linux-headers git go file --rep

RUN git clone https://github.com/mosajjal/dnsmonster.git /opt/dnsmonster --depth 1 \
&& cd /opt/dnsmonster/src \
&& go build --ldflags "-L /usr/lib/libcap.a -linkmode external -extldflags \"-static\""
&& export LATEST_TAG=`git describe --tags` \
&& go build --ldflags "-L /usr/lib/libcap.a -linkmode external -X main.releaseVersion=$LATEST_TAG -extldflags \"-static\""

FROM scratch
COPY --from=0 /opt/dnsmonster/src/dnsmonster /dnsmonster
Expand Down

0 comments on commit 01ed8fe

Please sign in to comment.