forked from PeterDaveHello/docker-azcopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (25 loc) · 855 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ARG AZCOPY_VERSION=v10.26.0
ARG GO_VERSION=1.23
ARG ALPINE_VERSION=3.20
ARG TARGETARCH
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} as build
ARG TARGETARCH
ARG AZCOPY_VERSION
ENV GOARCH=$TARGETARCH GOOS=linux CGO_ENABLED=0
WORKDIR /azcopy
RUN apk add --no-cache build-base && \
wget -O azcopy.tar.gz https://github.com/Azure/azure-storage-azcopy/archive/${AZCOPY_VERSION}.tar.gz && \
tar -xzf azcopy.tar.gz --strip-components=1 && \
go build -o azcopy && \
./azcopy --version
FROM alpine:${ALPINE_VERSION} as release
ARG TARGETARCH
ARG AZCOPY_VERSION
LABEL name="docker-azcopy"
LABEL version="$AZCOPY_VERSION"
LABEL maintainer="Meysam <meysam@licenseware.io>"
COPY --from=build /azcopy/azcopy /usr/local/bin/
RUN apk add --update coreutils && \
rm -rf /var/cache/apk/*
ENTRYPOINT [ "sh", "-c" ]
CMD [ "azcopy --help" ]