English in’t my native language and I’m sorry. But if you know answer, please help me.
please include the error message you get, else nobody can help you.
I think error’s text is useless. Any other bash cmds works good.
2017/07/04 17:32:42 could not greet: rpc error: code = Unknown desc = exit status 1
exit status 1
is the user in the docker group ?
I don’t know this. I use “sudo” and anyway it must ignore group or am i wrong?
Please run the “docker.help” command, it should tell you how to prepare the system (I am not sure if sudo helps with the snap)
it tell: “sudo snap connect docker:home :home”. I run this command, this is doesn’t help(
after you created the group and added the user to it ?
Yes, after all manipulations problem doesn’tt throw away
if you use the “groups” command, is docker listed there ?
docker in snap container, i use “sudo classic” and there use group commands
why do you use “sudo classic” are you on a development board in an ubuntu core image ?
1. Did you define a plug in your snapcraft.yaml file to connect the slot(docker-executables) declared in docker-snap?
2. Did you connect all relevant plugs after your snap first installation? The reason here is that you need to connect them as you built your snap locally.
Here is the guide you can follow up to create your own dockerized-based snap.
Please let me know if you have any further questions.
Hello, Gary. Can you see my snapcraft.yaml, any mistakes?
name: sqdron # you probably want to 'snapcraft register '
version: ‘1.0’ # just for humans, typically ‘1.2+git’ or '1.3.2’
summary: Something # 79 char long summary
For your dockerized snap, there’s no need to declare slots in your snap(consumer) if you try to use docker command shared by docker-snap(producer). The slots are needed to be declared on producer end.
For any bash where you invoke the docker or docker-compose, you need to append docker-executables and docker-cli in plugs field and connect them upon installation to get the privilege to run docker command within your snap sandbox.
Meanwhile, as we announced in this thread, we just added the content-interface support in latest version docker-snap and promoted them to candidate channel of the respective tracks.
- Latest/candidate: 17.03.2-ce-1
- 17.03/candidate: 17.03.2-ce-1
- 17.06/candidate: 17.06.0-ce-1
So you need to refresh your docker snap to one of those three if you install the snap from stable channel.
snap refresh docker --candidate
or install it from candidate channel from latest track directly.
snap install docker --candidate
I’d recommend taking a look at this thread to learn how to use content-interface in the snap, especially on the consumer end.
Also It would be better if you can upload your whole project somewhere github or launchpad, then I can take a closer look if you have any further question.
I created a PR. Please take a look.
To have a quick verification, you need to run snapcraft against my branch to build snap package firstly.
Then install your snap with dangerous option added as it’s fully confined
$ snap install --dangerous docker-app_0.1_amd64.snap
And connect the relevant plugs upson installation since you build it locally
$snap connect docker-app:privileged :docker-support $snap connect docker-app:support :docker-support $snap connect docker-app:docker-cli docker:docker-daemon $snap connect docker-app:docker-executables docker:docker-executables
Finally, run docker-app.sqdron command and check the print-out
Note: you’re not allowed to install another snap within you snap sandbox in confinement mode due to the apparmor denials. Also you need to drop sudo in your code for the same reason. So I commented that line. If your snap replies on docker-snap to function, you need to ask users to install it in advance by themselves.
OH, thanks for your big work! It’s work on amd64, it’s nice, but i develop my app for raspberry pi. Does ARM version of docker-wrapper exist(i work with ubuntu core if this is something mean)? Now i get this error, when try snapcraft on my raspberry
The specified command ‘docker-wrapper’ defined in the app ‘sqdron’ does not exist or is not executable
The only way i can build, when change in apps docker-wrapper -> bin/docker-wrapper. But in this path i get this error upon start command
/snap/sqdron/x2/command-sqdron.wrapper: 4: exec: /snap/sqdron/x2/bin/docker-wrapper: Permission denied
Of cause, you could check the CPU architecture via SNAP_ARCH environment variable, adjust LD_LIBRARY_PATH a bit then you could get your snap working on Pi3(armhf).
This means you need to sudo to launch the app(sqdron).
Here is the how I get your snap running on Pi3(armhf), please take a look.