diff --git a/Dockerfile b/Dockerfile index 79dd2f0..e664a50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ -ARG ARCH= -ARG GOARCH= +ARG ARCH +ARG GOARCH FROM golang:1.16-alpine AS builder +ARG ARCH +ARG GOARCH + RUN apk add make perl-utils WORKDIR /tmp COPY server server @@ -8,5 +11,7 @@ COPY Makefile . RUN make build GOOS=linux GOARCH=${GOARCH} FROM ${ARCH}/alpine:3.15 +ARG ARCH +ARG GOARCH COPY --from=builder ["/tmp/build/basenine_linux_${GOARCH}", "./basenine"] ENTRYPOINT "./basenine"