← Back to issue list

stage-snaps don't work on docker

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1885028
Type
issue
State
closed
Author
~kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Closed as won't fix after legacy Docker support was retired: canonical/snapcraft#5063 removed the Dockerfile and directed container builds to snapcraft-rocks OCI images.

Resolution: closed stale

Reason: The closing maintainer marked the report won't fix because containerized builds had moved from Snapcraft's Dockerfile to snapcraft-rocks OCI images. Commit 24e70d6db in canonical/snapcraft#5063 removed the obsolete Dockerfile and documented that replacement.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Take this part: parts: foo: plugin: nil stage-snaps: [go] It doesn't work in docker, failing with: # snapcraft The following snaps are required but not installed as snapcraft is running inside docker or podman container: core18. Please ensure the environment is properly setup before continuing. Ignore this message if the appropriate measures have already been taken Sorry, an error occurred in Snapcraft: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) If I look at the traceback, it looks like this: # cat /tmp/tmpkhsge2v6/trace.txt Traceback (most recent call last): File "/snap/snapcraft/current/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/snap/snapcraft/current/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request conn.request(method, url, **httplib_request_kw) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1254, in request self._send_request(method, url, body, headers, encode_chunked) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1300, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1249, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1036, in _send_output self.send(msg) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 974, in send self.connect() File "/snap/snapcraft/current/lib/python3.6/site-packages/requests_unixsocket/adapters.py", line 32, in connect sock.connect(socket_path) FileNotFoundError: [Errno 2] No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/snapcraft/current/lib/python3.6/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/snap/snapcraft/current/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/snap/snapcraft/current/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment raise six.reraise(type(error), error, _stacktrace) File "/snap/snapcraft/current/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise raise value.with_traceback(tb) File "/snap/snapcraft/current/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/snap/snapcraft/current/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request conn.request(method, url, **httplib_request_kw) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1254, in request self._send_request(method, url, body, headers, encode_chunked) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1300, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1249, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 1036, in _send_output self.send(msg) File "/snap/snapcraft/current/usr/lib/python3.6/http/client.py", line 974, in send self.connect() File "/snap/snapcraft/current/lib/python3.6/site-packages/requests_unixsocket/adapters.py", line 32, in connect sock.connect(socket_path) urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/snapcraft/current/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==3.9.1', 'console_scripts', 'snapcraft')() File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 1236, in invoke return Command.invoke(self, ctx) File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/cli/_runner.py", line 104, in run snap_command.invoke(ctx) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/cli/_command.py", line 88, in invoke return super().invoke(ctx) File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/current/lib/python3.6/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 280, in snap _execute(steps.PRIME, parts=[], pack_project=True, output=output, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 78, in _execute lifecycle.execute(step, project_config, parts) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 131, in execute executor.run(step, part_names) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 185, in run self._handle_step(part_names, part, step, current_step, cli_config) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 199, in _handle_step getattr(self, "_run_{}".format(current_step.name))(part) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 241, in _run_pull self._run_step(step=steps.PULL, part=part, progress="Pulling") File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 315, in _run_step self._prepare_step(step=step, part=part) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 307, in _prepare_step preparation_function() File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 450, in prepare_pull self._fetch_stage_snaps() File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 412, in _fetch_stage_snaps snaps_list=stage_snaps, directory=self.plugin.snapsdir File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/repo/snaps.py", line 278, in download_snaps if not snap_pkg.is_valid(): File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/repo/snaps.py", line 168, in is_valid if not self.in_store: File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/repo/snaps.py", line 91, in in_store self._is_in_store = self.get_store_snap_info() is not None File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/repo/snaps.py", line 114, in get_store_snap_info self._store_snap_info = _get_store_snap_info(self.name) File "/snap/snapcraft/current/lib/python3.6/site-packages/snapcraft/internal/repo/snaps.py", line 390, in _get_store_snap_info snap_info = requests_unixsocket.get(url) File "/snap/snapcraft/current/lib/python3.6/site-packages/requests_unixsocket/__init__.py", line 51, in get return request('get', url, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/requests_unixsocket/__init__.py", line 46, in request return session.request(method=method, url=url, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/requests/sessions.py", line 524, in request resp = self.send(prep, **send_kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/requests/sessions.py", line 637, in send r = adapter.send(request, **kwargs) File "/snap/snapcraft/current/lib/python3.6/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) It makes sense why build-snaps aren't supported in docker, but I feel like stage-snaps should work.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed as won't fix after legacy Docker support was retired: canonical/snapcraft#5063 removed the Dockerfile and directed container builds to snapcraft-rocks OCI images.
stealth/space-bunny-alpha — closed stale Closed as won’t fix after legacy Docker builds were replaced by snapcraft-rocks OCI images; Dockerfile support was removed in canonical/snapcraft#5063 (24e70d6db).
stealth/space-bunny-alpha — closed stale No verified fixing PR or commit is available; the outcome of the Snapcraft stage-snaps Docker issue cannot be confirmed.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The reported Unix socket connection failure preventing stage-snaps from working in Docker remains unfixed.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 45
Confidence: 75
Support Request: 10
close stale stage-snaps fail in Docker due to snapd Unix socket errors. Issue is 6 years old, has no maintainer response, and lacks labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 10
close stale Report of stage-snaps failing in Docker due to a missing Unix socket connection when fetching snap metadata. Unaddressed for over 6 years with no maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 25
close stale Snapcraft crashes when using stage-snaps in Docker due to an unmounted snapd socket. The issue has been inactive for over 4.5 years with no maintainer labels or responses.

Update history

Date Change
created

Related work

  • Superseded By: canonical/snapcraft#5063 (confidence 98%)

    Removed the legacy Dockerfile and documented snapcraft-rocks OCI images, matching the closing rationale.

  • Related To: snapcraft-rocks#110 (confidence 85%)

    Confirms snapd is unavailable in the OCI build environment and that build snaps require manual staging.

Related issues

Issue Project State Summary Similarity
#1901733 stage-snaps not usable with branches snapcraft (launchpad) closed Stage/build-snap branch channels were identified as blocked by Snapcraft validation, but no fix landed; the item was eventually abandoned and closed as stale.
72%
#1826611 Running snapcraft 3 w/ core18 base in docker incorrectly reports missing lib deps snapcraft (launchpad) closed Closed as stale after 2,716 days; Snapcraft's legacy Dockerfiles had been updated, then OCI builds moved to Rocks. No resolving fix was identified.
70%