forked from wardgate/wardgate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.conclave
More file actions
43 lines (34 loc) · 1.06 KB
/
Dockerfile.conclave
File metadata and controls
43 lines (34 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Example Dockerfile for a wardgate conclave.
# Customize the installed tools for your use case.
#
# Build:
# docker build -f Dockerfile.conclave -t wardgate-conclave .
#
# Run (mount your config):
# docker run -d \
# -v /path/to/data:/data:ro \
# -v /path/to/conclave-config.yaml:/etc/wardgate-exec/config.yaml:ro \
# wardgate-conclave
# Build wardgate-exec
FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o wardgate-exec ./cmd/wardgate-exec
# Runtime
FROM alpine:3.21
# Install tools available in this conclave.
# Customize this list for your use case.
RUN apk add --no-cache ca-certificates ripgrep coreutils python3
# Create non-root user
RUN adduser -D -u 1000 conclave
# Copy binary
COPY --from=builder /app/wardgate-exec /usr/local/bin/wardgate-exec
# Copy standard file tools
COPY scripts/file_*.py /usr/local/lib/wardgate-tools/
# Data volume
VOLUME /data
USER conclave
ENTRYPOINT ["wardgate-exec"]
CMD ["-config", "/etc/wardgate-exec/config.yaml"]