mirror of
https://github.com/fosrl/gerbil.git
synced 2026-02-08 05:56:40 +00:00
changed docker image from ubuntu to alpine
This commit is contained in:
@@ -16,18 +16,13 @@ COPY . .
|
|||||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /gerbil
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /gerbil
|
||||||
|
|
||||||
# Start a new stage from scratch
|
# Start a new stage from scratch
|
||||||
FROM ubuntu:24.04 AS runner
|
FROM alpine:3.22 AS runner
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y iptables iproute2 && rm -rf /var/lib/apt/lists/*
|
RUN apk add --no-cache iptables iproute2
|
||||||
|
|
||||||
# Copy the pre-built binary file from the previous stage and the entrypoint script
|
|
||||||
COPY --from=builder /gerbil /usr/local/bin/
|
COPY --from=builder /gerbil /usr/local/bin/
|
||||||
COPY entrypoint.sh /
|
COPY entrypoint.sh /
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
# Copy the entrypoint script
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
# Command to run the executable
|
|
||||||
CMD ["gerbil"]
|
CMD ["gerbil"]
|
||||||
Reference in New Issue
Block a user