aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-10-16 17:06:05 +0000
committerEmiliano Ciavatta2020-10-16 17:06:05 +0000
commit56f70a72196c777f248038bb2e2e4099e6e1367d (patch)
tree714ad5aed8698dfffbb472b3fa74909acb8cdead /Dockerfile
parent6204c99e69d1707a79c5e56685b47310106c60b0 (diff)
parent79b8b2fa3e8563c986da8baa3a761f2d4f0c6f47 (diff)
Merge branch 'develop'
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index cf7730b..a9c8134 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,15 +3,16 @@ FROM ubuntu:20.04 AS BUILDSTAGE
# Install tools and libraries
RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get install -qq golang-1.14 pkg-config libpcap-dev libhyperscan-dev yarnpkg
+ DEBIAN_FRONTEND=noninteractive apt-get install -qq git golang-1.14 pkg-config libpcap-dev libhyperscan-dev yarnpkg
COPY . /caronte
WORKDIR /caronte
RUN ln -sf ../lib/go-1.14/bin/go /usr/bin/go && \
+ export VERSION=$(git describe --tags) && \
go mod download && \
- go build && \
+ go build -ldflags "-X main.Version=$VERSION" && \
cd frontend && \
yarnpkg install && \
yarnpkg build --production=true && \