plc-mirror/cmd/consumer/Dockerfile

15 lines
374 B
Docker
Raw Normal View History

2024-05-21 10:47:36 +02:00
FROM golang:1.22.3 as builder
2024-02-15 17:10:39 +01:00
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN go build -trimpath ./cmd/consumer
FROM alpine:latest as certs
RUN apk --update add ca-certificates
FROM debian:stable-slim
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /app/consumer .
ENTRYPOINT ["./consumer"]