-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debian/Ubuntu-based images #306
Comments
See #127, where this has been discussed previously 😅 |
Damn, I've tried searching for that before but GitHub's search engine is far from perfect and I thought that the subject hadn't been touched yet 😉 Nevertheless, my use case requires me to use a non-Alpine OS — I'm working on containerizing a self-hosted GitHub Actions runner which does not support Alpine (and by the looks of it, it's not going to in a foreseeable future) so I'm going to have to maintain a Debian image on my own. I just thought that I could share it so that others could benefit from it too. If you ever reconsider the decision, feel free to ping me here and I'll be happy to chip in 😊 |
Heh, on the side, I personally maintain 2-3 separate Debian-based Docker-in-Docker images for my own purposes, but each of them pulls from a different source of very specific Docker binaries (so Debian was chosen in one case because it's my personal preference and in the other because the binaries I'm consuming are in If what you're looking for is just a "Something Else"-based Docker-in-Docker image, here's the simplest method I can think of: FROM debian:buster-slim
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
iptables \
openssl \
pigz \
xz-utils \
; \
rm -rf /var/lib/apt/lists/*
ENV DOCKER_TLS_CERTDIR=/certs
RUN mkdir /certs /certs/client && chmod 1777 /certs /certs/client
COPY --from=docker:20.10.5-dind /usr/local/bin/ /usr/local/bin/
VOLUME /var/lib/docker
ENTRYPOINT ["dockerd-entrypoint.sh"]
CMD [] (Of course, the |
Hi, I think that with Or maybe install |
@tianon Thanks for giving that example! This is what I've been looking for. I'm comparing your Dockerfile example with the official 20.10 Dockerfile to see what you changed. It looks like you don't do anything to the file You also don't copy over You also added the command Edit: Looking more closely, it's clear I don't know the difference between the docker |
That's an Alpine-Linux-plus-Go-ism (not needed for distributions which already use
This is
The |
would this method also work with docker compose? |
If you ask |
Haha sorry I should have clarified the question: I'm trying to set up an ubuntu:22.04 container with the ability to run docker and docker compose inside the container. My current file looks a bit like:
And then my docker compose file:
The ultimate goal is to be able to scale up self hosted Github Actions runners that can use docker and docker compose from within the containers. Sorry for the nooby question, I'm quite new to all this. I tried doing
Because I think that is more elegant however I couldnt get docker compose to work this way. |
Ah, sorry, you're not even using this image (or its contents), so that's really a lot out of scope here. 😅 With the approach in #306 (comment), you "just" need to add the CLI plugins directory to the things you copy from the |
I see! Thank you! I have this working now. With dockerfile:
and then the compose file:
This is a far more elegant solution than my origional one. Thank you for your help 👍 |
Hi,
Currently all image variants are based on Alpine. It's totally fine, in most cases this is the best choice for the container OS. However, some cases require a different OS to be used while still having to use Docker in Docker. I was successful in running creating a Debian-based DinD image using most of the scripts found in this repo without many changes, so it definitely can be done. Hence my question: wouldn't it be a good idea to add an official Docker image based on an OS other than Alpine?
If there's a green light on that, you can count on me to update the templates and scripts and prepare a PR with needed changes.
M.
The text was updated successfully, but these errors were encountered: