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

mixer: Prompt when Docker is not running/user is not in docker group. #446

Closed
cedws opened this issue Feb 12, 2019 · 5 comments
Closed

mixer: Prompt when Docker is not running/user is not in docker group. #446

cedws opened this issue Feb 12, 2019 · 5 comments

Comments

@cedws
Copy link

cedws commented Feb 12, 2019

Is your feature request related to a problem? Please describe.
I'm trying out the mixer tool, but had issues with mixer build update due to two reasons:

  • The user is not automatically added to the docker group. I ran sudo usermod -aG docker $USER, logged out and then back in (to apply group changes) to fix this.
  • The Docker daemon is not automatically started. I ran systemctl start docker to fix this.

These issues lead to the mixer tool spitting out the following:

clear@clr-5929a8464b294d10a245d030a6a6107d ~/mix $ mixer build update
Updating docker image
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
2019/02/12 17:13:57 Warning: Unable to pull docker image for format 27. Trying with cached image
Running command in container: "mixer build update"
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
Error: Failed to run command in container: failed to execute docker run --runtime=runc -i --network=host --rm --workdir /home/clear/mix --entrypoint mixer -v /home/clear/mix:/home/clear/mix clearlinux/mixer:27 build update --native: exit status 125

Describe the solution you'd like
I think the Docker daemon should be enabled (systemctl enable docker) and started (systemctl start docker) when installed with swupd bundle-add, or else any mixer commands which use Docker will fail. The user ideally would automatically be added to the docker group too, but that could pose risks, so the mixer tool should prompt for this.

Describe alternatives you've considered
An alternative would be for the mixer tool to detect if the Docker daemon is running, and whether the user is in the Docker group.

Additional context
N/A.

@cedws cedws changed the title mixer: Docker should automatically start. mixer: Prompt when Docker is not running/user is not in docker group. Feb 12, 2019
@bryteise
Copy link
Member

I think the usage of docker in mixer is going away from my memory @rchiossi would know for sure here.

@rchiossi
Copy link

Hi @c-edw , thank you for your issue report.

As @bryteise said, we are cunrently working on removing the built in docket feature in mixer since it is not needed for automated format bumps anymore. The current plan is to provide a separate docker image for users that need docker for compatibility reasons. As it will be a normal docker image like any other, there is no need for mixer to be aware of it.

@cedws
Copy link
Author

cedws commented Feb 12, 2019

I'm not quite clear on how you are using Docker - I assumed that containers were being used ephemerally to build packages/images. If it's being removed then feel free to close this 👍

@nesiusra
Copy link

@rchiossi - closing this - but if you have a feature open for this work then maybe add @c-edw to it?

@rchiossi
Copy link

We are tracking this change here: clearlinux/mixer-tools#528

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

4 participants