forked from PeterDaveHello/docker-azcopy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]>" | ||
COPY --from=build /azcopy/azcopy /usr/local/bin | ||
WORKDIR /WORKDIR | ||
COPY --from=build /azcopy/azcopy /usr/local/bin/ | ||
CMD [ "azcopy" ] |