2023-01-21 15:03:44 +01:00
|
|
|
FROM golang:1.19-bullseye AS builder
|
|
|
|
|
|
|
|
WORKDIR /build
|
2023-01-22 13:18:57 +01:00
|
|
|
COPY go.mod go.sum /build/
|
2023-01-21 15:03:44 +01:00
|
|
|
COPY cmd /build/cmd/
|
|
|
|
COPY internal /build/internal/
|
|
|
|
|
2023-01-22 13:18:57 +01:00
|
|
|
RUN go test -v ./...
|
2023-01-21 15:03:44 +01:00
|
|
|
RUN CGO_ENABLED=0 go build ./cmd/debian-dsa
|
|
|
|
|
|
|
|
FROM alpine:3
|
|
|
|
|
|
|
|
COPY --from=builder /build/debian-dsa /opt/resource/check
|
|
|
|
COPY README.md COPYING /
|
|
|
|
RUN ln /opt/resource/check /opt/resource/in
|
|
|
|
RUN ln /opt/resource/check /opt/resource/out
|