Skip to content

Commit 1260c99

Browse files
authored
Merge pull request #1 from h0lm0/feture/docker
Docker implementation
2 parents b30dda2 + 55a9992 commit 1260c99

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM golang:1.24 AS go_builder
2+
3+
WORKDIR /build
4+
5+
COPY go.mod ./
6+
7+
RUN go mod download
8+
9+
COPY . .
10+
11+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o api-fuzz
12+
13+
FROM alpine:3.21
14+
15+
WORKDIR /app
16+
17+
RUN mkdir -p /app/config
18+
RUN adduser -D -u 1000 -s /sbin/nologin app
19+
COPY --chown=app:app entrypoint.sh /app/entrypoint.sh
20+
RUN chmod +x /app/entrypoint.sh
21+
22+
USER app
23+
24+
COPY --from=go_builder /build/api-fuzz /app/api-fuzz
25+
26+
ENTRYPOINT ["/app/entrypoint.sh"]

entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec /app/api-fuzz "$@"

0 commit comments

Comments
 (0)