diff --git a/Dockerfile b/Dockerfile index fdcab85..29daeef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,20 +4,19 @@ ARG ALPINE_VERSION=3.19 ARG TARGETARCH FROM golang:$GO_VERSION-alpine$ALPINE_VERSION as build -ENV GOARCH=$TARGETARCH GOOS=linux +ENV GOARCH=$TARGETARCH GOOS=linux CGO_ENABLED=0 WORKDIR /azcopy ARG AZCOPY_VERSION RUN apk add --no-cache build-base RUN wget "https://github.com/Azure/azure-storage-azcopy/archive/v$AZCOPY_VERSION.tar.gz" -O src.tgz || wget "https://github.com/Azure/azure-storage-azcopy/archive/$AZCOPY_VERSION.tar.gz" -O src.tgz RUN tar xf src.tgz --strip 1 \ - && go build -o azcopy \ - && ./azcopy --version + && go build -o azcopy \ + && ./azcopy --version FROM alpine:$ALPINE_VERSION as release ARG AZCOPY_VERSION LABEL name="docker-azcopy" LABEL version="$AZCOPY_VERSION" LABEL maintainer="Meysam " -COPY --from=build /azcopy/azcopy /usr/local/bin -WORKDIR /WORKDIR +COPY --from=build /azcopy/azcopy /usr/local/bin/ CMD [ "azcopy" ]