mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-10 06:48:04 -05:00
29 lines
634 B
Docker
29 lines
634 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
|
|
# Install build dependencies
|
|
RUN apk add --no-cache git
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /fabric ./cmd/fabric
|
|
|
|
FROM alpine:latest
|
|
|
|
LABEL org.opencontainers.image.description="A Docker image for running the Fabric CLI. See https://github.com/danielmiessler/Fabric/tree/main/scripts/docker for details."
|
|
|
|
RUN apk add --no-cache ca-certificates yt-dlp \
|
|
&& mkdir -p /root/.config/fabric
|
|
|
|
COPY --from=builder /fabric /usr/local/bin/fabric
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["fabric"]
|