Files
ZPLify/Dockerfile
Malin 05e60cdfe3 feat: add web UI and Docker setup for ZPLify
- HTTP server wrapping zplgfa library (port 4543)
- File upload with drag-and-drop, width/height resize, encoding selection, image edits
- /convert endpoint returns ZPL output; /preview returns image dimensions
- Dockerfile (multi-stage, Alpine) and docker-compose.yml
2026-03-26 09:52:13 +01:00

25 lines
635 B
Docker

FROM golang:1.22-alpine AS builder
WORKDIR /src
# Copy module files and download deps
COPY go.mod go.sum ./
RUN go mod download
# Copy source
COPY . .
# Build the web server
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /zplgfa-web ./cmd/web
# ─── Final stage ────────────────────────────────────────────────────────────
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
COPY --from=builder /zplgfa-web /usr/local/bin/zplgfa-web
EXPOSE 4543
ENTRYPOINT ["/usr/local/bin/zplgfa-web"]