Local proxy-cache to speed up the 'apk add ...'"
#!Dockerfile
FROM alpine
ARG APK_CACHE_IP=172.17.0.1
ARG APK_CACHE_DOMAIN='dl-cdn.alpinelinux.org'
ARG RUN_DEPS='nginx ca-certificates'
ARG BUILD_DEPS=''
RUN nc -z $APK_CACHE_IP 80 && echo $APK_CACHE_IP $APK_CACHE_DOMAIN >>/etc/hosts \
; apk --update add --no-cache $RUN_DEPS $BUILD_DEPS \
&& apk del $BUILD_DEPS && rm -rf /var/cache/apk/*
WORKDIR /etc/nginx
ADD . .
CMD ["nginx","-g","daemon off;"]
Content type
Image
Digest
Size
3.7 MB
Last updated
over 9 years ago
docker pull cloudmore/alpine-cache