diff --git a/Dockerfile b/Dockerfile index fbc4180..0078448 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22-alpine +FROM golang:1.22-alpine as build COPY ./ /go/src/github.com/CenterForOpenScience/fakecas @@ -11,7 +11,10 @@ ENV GIT_TAG ${GIT_TAG} RUN cd /go/src/github.com/CenterForOpenScience/fakecas \ && go mod download \ - && VERSION=${GIT_TAG} go build -o fakecas \ - && mv /go/src/github.com/CenterForOpenScience/fakecas/fakecas /usr/local/bin/ + && VERSION=${GIT_TAG} go build -o fakecas + +FROM alpine:3.19 as runtime + +COPY --from=build /go/src/github.com/CenterForOpenScience/fakecas/fakecas /usr/local/bin/ CMD ["fakecas"]