docker-gc/Dockerfile
2017-05-25 19:52:37 +01:00

40 lines
762 B
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM scratch
ADD rootfs.tar.xz /
MAINTAINER sparklyballs
# environment variables
ENV FORCE_CONTAINER_REMOVAL=1
ENV FORCE_IMAGE_REMOVAL=1
# install runtime packages
RUN \
apk add --no-cache \
bash \
docker && \
# install build packages
apk add --no-cache --virtual=build-dependencies \
git && \
# fetch docker-gc repo to get latest ver of script
git clone https://github.com/spotify/docker-gc /tmp/docker-gc && \
# link docker executable, copy and make docker-gc executable
ln -s /usr/bin/docker \
/bin/docker && \
cp /tmp/docker-gc/docker-gc /docker-gc && \
chmod +x \
/docker-gc && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# port and volumes
VOLUME /var/lib/docker-gc
# run command
CMD ["/docker-gc"]