aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile2
-rw-r--r--Dockerfile.testing18
-rw-r--r--docker-compose.testing.yml2
3 files changed, 20 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 4e097e5..cf7730b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -27,7 +27,7 @@ FROM ubuntu:20.04
COPY --from=BUILDSTAGE /caronte-build /caronte
RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get install -qq golang-1.14 pkg-config libpcap-dev libhyperscan-dev && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -qq libpcap-dev libhyperscan-dev && \
rm -rf /var/lib/apt/lists/*
ENV GIN_MODE release
diff --git a/Dockerfile.testing b/Dockerfile.testing
new file mode 100644
index 0000000..3498341
--- /dev/null
+++ b/Dockerfile.testing
@@ -0,0 +1,18 @@
+FROM ubuntu:20.04
+
+# 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
+
+COPY . /caronte
+
+WORKDIR /caronte
+
+RUN ln -sf ../lib/go-1.14/bin/go /usr/bin/go && \
+ go mod download && \
+ go build && \
+ cd frontend && \
+ yarnpkg install && \
+ yarnpkg build
+
+CMD ./caronte
diff --git a/docker-compose.testing.yml b/docker-compose.testing.yml
index ff33e3c..9d75af9 100644
--- a/docker-compose.testing.yml
+++ b/docker-compose.testing.yml
@@ -10,7 +10,7 @@ services:
caronte:
build:
context: .
- dockerfile: Dockerfile
+ dockerfile: Dockerfile.testing
image: caronte
ports:
- "6666:6666"