Last active
August 11, 2024 20:12
-
-
Save casperklein/b7301b8fda5ec9f737909496e270024b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| FROM debian:12-slim AS build | |
| ENV PACKAGES="make ca-certificates curl gnupg lsb-release jq python3 curl git iptables sudo file parallel" | |
| SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |
| # Install packages | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update \ | |
| && apt-get -y upgrade \ | |
| && apt-get -y install --no-install-recommends $PACKAGES | |
| # Install Docker | |
| RUN curl -fsSL https://get.docker.com | bash | |
| # Cleanup | |
| RUN rm -rf /var/lib/apt/lists/* | |
| # Build final image | |
| FROM scratch | |
| HEALTHCHECK CMD docker version || exit 1 | |
| # /var/lib/docker cannot be on AUFS, so we make it a volume. | |
| VOLUME /var/lib/docker | |
| COPY --from=build / / | |
| ENTRYPOINT ["dockerd"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment