`SNAPCRAFT_BUILD_ENVIRONMENT=host` needs to be set to run `snapcraft` manually inside the image for troubleshooting. See https://github.com/canonical/snapcraft-rocks/issues/57#issuecomment-2371175038 It would be more helpful if this variable is set for the whole Docker image.