aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile15
-rw-r--r--docker-compose.yml2
2 files changed, 0 insertions, 17 deletions
diff --git a/Dockerfile b/Dockerfile
index 165fd83..b9b5ecc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,22 +8,16 @@ RUN apt-get update && \
pkg-config \
libpcap-dev \
libhyperscan-dev
-
WORKDIR /caronte
-
COPY . ./
-
RUN go mod download
-
RUN export VERSION=$(git describe --tags --abbrev=0) && \
go build -ldflags "-X main.Version=$VERSION" && \
mkdir -p build && \
cp -r caronte pcaps/ scripts/ shared/ test_data/ build/
-
# Build frontend via yarn
FROM node:16 as FRONTEND_BUILDER
-
ENV PNPM_VERSION 8.3.1
RUN npm install -g pnpm@${PNPM_VERSION}
WORKDIR /caronte-frontend
@@ -32,29 +26,20 @@ WORKDIR /caronte-frontend
COPY ./frontend/pnpm-lock.yaml ./
RUN pnpm fetch --prod
-
COPY ./frontend ./
RUN pnpm install && pnpm build
-
# LAST STAGE
FROM ubuntu:22.04
COPY --from=BACKEND_BUILDER /caronte/build /opt/caronte
-
COPY --from=FRONTEND_BUILDER /caronte-frontend/build /opt/caronte/frontend/build
-
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -qq \
libpcap-dev \
libhyperscan-dev && \
rm -rf /var/lib/apt/lists/*
-
ENV GIN_MODE release
-
ENV MONGO_HOST mongo
-
ENV MONGO_PORT 27017
-
WORKDIR /opt/caronte
-
ENTRYPOINT ./caronte -mongo-host ${MONGO_HOST} -mongo-port ${MONGO_PORT} -assembly_memuse_log
diff --git a/docker-compose.yml b/docker-compose.yml
index 484755a..e61108b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,4 +1,3 @@
-version: "3.7"
services:
mongo:
@@ -8,7 +7,6 @@ services:
restart: unless-stopped
caronte:
- image: ghcr.io/eciavatta/caronte:latest
build: .
ports:
- "3333:3333"