← Back to issue list

suppress snap installation when on docker

View original Launchpad issue

Metadata

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

Current evaluation

Snap installation in Docker was suppressed by detecting snapd-unavailable environments; linked PR snapcraft#2457 was merged as commit bacf47f7a.

Resolution: closed resolved

Reason: The maintainer linked resolving PR snapcraft#2457, which was merged as commit bacf47f7a. It changed lifecycle behavior to avoid installing snaps in Docker and warn that snapd is unavailable.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When using snapcraft with bases in docker it attempts to install the base snap which is not supported in docker. We are crafting a docker image with the core18 snap extracted to build with destructive mode. sed -i.back -e 's|installed_snaps =|installed_snaps = [] #|g' /snap/snapcraft/current/lib/python*/site-packages/snapcraft/internal/lifecycle/_runner.py && \

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Snap installation in Docker was suppressed by detecting snapd-unavailable environments; linked PR snapcraft#2457 was merged as commit bacf47f7a.
stealth/space-bunny-alpha — closed resolved Fixed Docker lifecycle handling in canonical/snapcraft#2457 (commit bacf47f7a), preventing unsupported snap installation attempts during base-based builds.
stealth/space-bunny-alpha — closed resolved Docker detection was added to prevent unsupported base-snap installation; the fix merged in canonical/snapcraft#2457 via commit bacf47f7a.
stealth/space-bunny-alpha — closed resolved Snapcraft now detects Docker and fails before attempting unsupported snap installation, including base-snap installation; merged in PR #2457.
qwen/qwen3.6-35b-a3b — — Closed with a provided sed workaround to suppress snap installation in Docker. No official fix or merge was implemented, indicating the issue was abandoned or resolved locally.
qwen/qwen3.6-35b-a3b — — Abandoned without a code fix. The author provided a sed workaround to patch _runner.py and suppress snap installation in Docker, resolving the problem locally.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#2457 (confidence 100%)

    Merged fix for suppressing snap installation in Docker.

Related issues

Issue Project State Summary Similarity
#2457 lifecyle: avoid installation of snaps in docker snapcraft merged Merged PR #2457 (commit bacf47f7a): Snapcraft now detects Docker environments and warns users instead of attempting snap installation without snapd.
78%
#3210 docker: install snapd dependency snapcraft merged Merged PR #3210 in commit 42d3861a, adding snapd to Snapcraft Docker images so required snap pack operations continue working.
74%