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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With