Files
cat-memes/Containerfile

14 lines
243 B
Docker

# Stage 1: Build the Go binary
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o catapp .
# Stage 2: Minimal runtime image
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/catapp .
EXPOSE 8080
CMD ["./catapp"]