How do I build docker images without docker?
Is there some lightweight way I can build a docker image within a container without having a working docker machine. Here’s what I’m trying to do:
$ docker run -it --rm docker:latest / # mkdir test / # touch test/Dockerfile / # docker build test Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Assuming I had a valid Dockerfile in place, is there some way I could create an docker image from within a container like this?
One Solution collect form web for “How do I build docker images without docker?”
Part of the problem could be that you’re missing the
--privileged flag, but in general, your questions can probably be answered here: https://hub.docker.com/_/docker/
And you might take the time to read the blog linked there detailing some of the pitfalls of using docker-in-docker.