Skip to content

Instantly share code, notes, and snippets.

@Vijaydaswani
Created June 27, 2020 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vijaydaswani/6eeb5741f2806a95c3dacaf3b80bf223 to your computer and use it in GitHub Desktop.
Save Vijaydaswani/6eeb5741f2806a95c3dacaf3b80bf223 to your computer and use it in GitHub Desktop.
AzCopy Docker Image built on top of Alpine.
FROM alpine AS build
RUN apk add --no-cache wget \
&& wget https://aka.ms/downloadazcopy-v10-linux -O /tmp/azcopy.tgz \
&& export BIN_LOCATION=$(tar -tzf /tmp/azcopy.tgz | grep "/azcopy") \
&& tar -xzf /tmp/azcopy.tgz $BIN_LOCATION --strip-components=1 -C /usr/bin
FROM alpine:3.9 AS final
RUN apk update && apk add libc6-compat ca-certificates
COPY --from=build /usr/bin/azcopy /usr/local/bin/azcopy
RUN ldd /usr/local/bin/azcopy
COPY ./azcopy.sh /etc/periodic/15min/job
RUN chmod +x /etc/periodic/15min/job
CMD ["crond", "-fS"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment