-
Notifications
You must be signed in to change notification settings - Fork 445
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
Cannot run snapcraft in docker anymore #5079
Comments
Thanks for the report! The only way I could see this happening is if you're setting the Separately I've created canonical/craft-application#497 upstream so that we behave better in situations like this. |
Separately from this - would it be feasible to move your use of snapcraft in containers to use https://github.com/canonical/snapcraft-rocks? |
I am running into the same issue. First, I saw an error stating
After adding the
Oddly enough, this actually only happens for the |
@lengau I used docker container from https://github.com/canonical/snapcraft-rocks and the build almost worked but it failed when my
|
This will be fixed in Snapcraft 8.4.2, which is scheduled to be in the candidate channel next week. |
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3530.
|
Hello, thanks for the quick follow-up. I am still facing this issue on release 8.4.3 (just got around to testing it, seems there was a follow-up release). Is anyone else still experiencing this? Here's the error stacktrace:
|
Hi @josephtensoriot, Sorry about this error occurring again.
Can you remove this environment variable and try again? |
@mr-cal with latest snapcraft I can finally build in docker
|
I had to add this build step
|
Removing the variable gives the
|
Here is my Dockerfile for reference. I tried adding the suggestion above but still seem to get the same error. I also tried to run this as root, though we're trying to run this as another user in our pipeline. This worked with 8.3.4 and prior versions, not sure what specific change broke it.
|
you should remove these three lines
|
Removing |
@josephtensoriot you should look at my complete Dockerfile I posted above. Note how I create the snapcraft launcher |
Seems there was one line I missed that was different: |
Glad it's working. I'm going to leave this issue open because we can improve the error handling. |
Bug Description
I cannot run snapcraft in docker container anymore. It requires snapd to be running.
To Reproduce
Build a docker container with snapcraft in it and then use that docker container to build a snap
Environment
Docker with noble based image
snapcraft.yaml
no yaml config needed
Relevant log output
The text was updated successfully, but these errors were encountered: