mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-10 23:08:06 -05:00
- Remove entire docker-test directory and testing infrastructure - Delete complex test runner script and environment files - Simplify production Dockerfile with multi-stage build optimization - Remove docker-compose.yml and start-docker.sh helper scripts - Update README with cleaner Docker usage instructions - Streamline container build process and reduce image size
27 lines
455 B
Docker
27 lines
455 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM golang:1.24-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
|
|
|
|
RUN apk add --no-cache ca-certificates \
|
|
&& mkdir -p /root/.config/fabric
|
|
|
|
COPY --from=builder /fabric /usr/local/bin/fabric
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["fabric"]
|