Update cmd/plc-mirror/Dockerfile

main
Astra 2024-10-26 03:50:41 +02:00
parent 90370ef60b
commit add8ffc1c4
1 changed files with 2 additions and 5 deletions

View File

@ -1,9 +1,6 @@
FROM golang:1.22.3 as builder FROM golang:1.22.3 as builder
WORKDIR /app WORKDIR /app
COPY go.mod go.sum ./ RUN GOPRIVATE=git.zio.sh go install git.zio.sh/astra/plc-mirror/cmd/plc-mirror@latest
RUN go mod download
COPY . ./
RUN go build -trimpath ./cmd/plc-mirror
FROM alpine:latest as certs FROM alpine:latest as certs
RUN apk --update add ca-certificates RUN apk --update add ca-certificates
@ -11,5 +8,5 @@ RUN apk --update add ca-certificates
FROM debian:stable-slim FROM debian:stable-slim
RUN apt update && apt install -y curl RUN apt update && apt install -y curl
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /app/plc-mirror . COPY --from=builder /go/bin/plc-mirror .
ENTRYPOINT ["./plc-mirror"] ENTRYPOINT ["./plc-mirror"]