← Back to issue list

Snapcraft is no longer working within a Docker container

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1956216
Type
issue
State
closed
Author
~mhoeher
Labels
Created
Updated
Closed

Current evaluation

⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.

Closed without resolution. The report detailed a snapcraft ModuleNotFoundError in Docker containers, but received no comments or fixes. The issue remains abandoned.

Suggested action:

No scores available.

Issue body

For building my app as a snap, I used to have a Docker image which I can use in my CI/CD pipelines. I maintain a repository to build the image on GitLab: https://gitlab.com/rpdev/docker/snapcraft The resulting Docker image is used in this project: https://gitlab.com/rpdev/opentodolist Initially, this worked quite fine and allowed immediate feedback when the Snap build would ever break. However, some weeks ago something must have changed upstream. I first thought that maybe my Dockerfile had an issue, so I migrated it to the "official" one from here: https://github.com/snapcore/snapcraft/tree/master/docker However, with both the upstream Dockerfile as well as my own one (which basically is inspired by the upstream one) I get the following error when running snapcraft within the container later on in the CI/CD pipelines (e.g. in this job -> https://gitlab.com/rpdev/opentodolist/-/jobs/1934812717): $ snapcraft snap Traceback (most recent call last): File "/snap/snapcraft/current/bin/snapcraft", line 5, in <module> from snapcraft.cli.__main__ import run ModuleNotFoundError: No module named 'snapcraft' I tried to look for a possible solution and found the following forum post: https://forum.snapcraft.io/t/snapcraft-failed-in-container/27921/2 I applied the suggested patch in the Dockerfile, but still get the same error. So it seems to me something changed upstream and completely broke using snapcraft within docker. Doing some further research, I think I am not the only one affected, see e.g. this issue on GitHub: https://github.com/cibuilds/snapcraft/issues/36 It would be really great if this could be fixed (because IMAO it is better to have the possibility to integrate the snap build directly with my project pipelines) or if this change is intentional, it should at least be properly documented (I think, it should be reflected here: https://snapcraft.io/docs/build-on-docker). Thanks for considering!

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without resolution. The report detailed a snapcraft ModuleNotFoundError in Docker containers, but received no comments or fixes. The issue remains abandoned.
qwen/qwen3.6-35b-a3b Closed without resolution. The reported snapcraft Docker container build failure remains unresolved, likely abandoned or superseded by upstream changes.
qwen3.6-35b-a3b-mtp-q6 Closed and abandoned without resolution or comments. The reported snapcraft Docker container failure remains unaddressed, likely superseded by upstream changes.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5079 Cannot run snapcraft in docker anymore snapcraft open Snapcraft crashes with SnapCtlError when run in Docker without snapd; reporter found a working Dockerfile workaround, maintainer kept it open to improve error handling. Triaged as enhancement, last activity 493 days ago.
77%
#1723965 snapcraft doesn't work snapcraft (launchpad) closed Closed without resolution or comments, indicating abandonment. The reported snap command failure and GL driver errors remain unresolved.
76%
#1750642 Snapcraft fails in LXD container on Debian 9 snapcraft (launchpad) closed Closed as stale. The Snapcraft LXD container build failure on Debian 9 was not resolved due to outdated Debian and Snapcraft versions no longer being supported.
73%
#1663625 No script named 'snapcraft' snapcraft (launchpad) closed A report of snapcraft failing after apt installation was closed without resolution or comments, indicating the matter was abandoned.
73%
#1951910 Refreshing snapd while running snapcraft fails with empty response from server snapcraft (launchpad) closed Closed without comments or resolution after ~78 days. Likely abandoned or marked stale. No fix or workaround was implemented.
72%
#1981979 snapcraft 7.0.8+ stopped working on non debian systems snapcraft (launchpad) closed Closed without resolution or comments. The reported apt_pkg error blocking snapcraft 7.0.8+ builds on non-Debian systems remains unfixed and the issue appears abandoned.
72%
#1561546 Snapcraft clean removes local plugins snapcraft (launchpad) closed Closed without a documented fix or resolution. The bug where snapcraft clean incorrectly removes local plugins remains unaddressed, likely abandoned due to prolonged inactivity.
72%
#1836355 Docker Container https://hub.docker.com/r/snapcore/snapcraft on edge doesnt contain snapd snapcraft (launchpad) closed Closed without resolution. The report regarding missing snapd in the snapcore/snapcraft:edge Docker image was abandoned due to prolonged inactivity. No fix or follow-up was provided.
72%
#1615764 Support snapcraft close snapcraft (launchpad) closed The requested snapcraft close command was closed without implementation. It appears abandoned due to prolonged inactivity, with zero comments or development activity after opening.
72%
#1548225 Snapcraft/snappy should detect incompatible version mismatches snapcraft (launchpad) closed Abandoned. The report detailed Snapcraft failing to detect version mismatches, causing large snaps to install incorrectly. With zero comments and over a decade of dormancy, it received no resolution and was closed.
72%