Skip to content
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

Don't use docker daemon to download images (nodeadm download) #100

Open
asafo opened this issue Jun 17, 2019 · 2 comments
Open

Don't use docker daemon to download images (nodeadm download) #100

asafo opened this issue Jun 17, 2019 · 2 comments

Comments

@asafo
Copy link

asafo commented Jun 17, 2019

Trying to automate klusterkit packaging into a Dockerfile, but:

RUN nodeadm download

will fail: Failed to list images with error Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I found no way to let the docker build command (re-)use the docker daemon.

There must be a way to implement this, i.e: download images and save to files, without running the docker cli and requiring a docker daemon (e.g: skopeo)

Thanks

@dlipovetsky
Copy link
Contributor

Removing the dependency on docker is a worthwhile idea.

Not sure if there's a workaround for build, but there is for run. We run nodeadm in a container in our internal CI. Here's a slightly edited version of what we do:

	docker run \
		--user $(shell id --user):$(shell id --group) \
		--group-add $(shell getent group docker | cut -d: -f3) \
		--privileged \
		--volume /var/run/docker.sock:/var/run/docker.sock \
		--rm \
		${IMAGE} \
		/nodeadm download

@asafo
Copy link
Author

asafo commented Jun 18, 2019

Thanks,
I'm aware of this technique, just don't know how to do this in docker build,
Anyway, I have created a pull request
Which implements this, based on code from skopeo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants