Skip to content

Issue with ghcr.io/devcontainers/features/python and /tmp #1527

@briedel

Description

@briedel

I am trying to use the PyTorch GPUU devcontainer. I am running into a weird issue with /tmp not being writable. This may be related to #1480 and devcontainers/images#1556.

The features are setup as follows:

	"features": {

		// ZSH without OMZ
		"ghcr.io/devcontainers/features/common-utils:2": {
			"installZsh": "true",
			"configureZshAsDefaultShell": "true",
			"installOhMyZsh": "false",
			"installOhMyZshConfig": "false",
			"username": "vscode",
			"userUid": "1000",
			"userGid": "1000",
			"upgradePackages": "true"
		},

		// Python with uv, Ruff, Mypy, MonkeyType and Bandit, installed using pipx
		"ghcr.io/devcontainers/features/python:1": {
			"installTools": "true",
			"toolsToInstall": "uv,ruff,mypy,MonkeyType,bandit"
		},

		// git
		"ghcr.io/devcontainers/features/git:1": {
			"version": "os-provided",
			"ppa": "false"
		}
	},

and the error is

[2025-12-11T14:53:07.479Z] ===========================================================================
Feature       : Python
Description   : Installs the provided version of Python, as well as PIPX, and other common Python utilities.  JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.
Id            : ghcr.io/devcontainers/features/python
Version       : 1.8.0
Documentation : https://github.com/devcontainers/features/tree/main/src/python
Options       :
    VERSION="os-provided"
    INSTALLTOOLS="true"
    TOOLSTOINSTALL="uv,ruff,mypy,MonkeyType,bandit"
    OPTIMIZE="false"
    ENABLESHARED="false"
    INSTALLPATH="/usr/local/python"
    INSTALLJUPYTERLAB="false"
    CONFIGUREJUPYTERLABALLOWORIGIN=""
    HTTPPROXY=""
===========================================================================
[2025-12-11T14:53:07.529Z] find: ‘/var/lib/apt/lists/*’: No such file or directory
[2025-12-11T14:53:07.529Z] Running apt-get update...
[2025-12-11T14:53:07.808Z] Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
[2025-12-11T14:53:07.861Z] Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
[2025-12-11T14:53:07.961Z] Err:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
  Couldn't create temporary file /tmp/apt.conf.CiOY60 for passing config to apt-key
[2025-12-11T14:53:08.622Z] Err:2 http://archive.ubuntu.com/ubuntu jammy InRelease
  Couldn't create temporary file /tmp/apt.conf.ohVIZQ for passing config to apt-key
[2025-12-11T14:53:08.817Z] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
[2025-12-11T14:53:08.958Z] Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
  Couldn't create temporary file /tmp/apt.conf.jHdMmd for passing config to apt-key
[2025-12-11T14:53:09.153Z] Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
[2025-12-11T14:53:09.358Z] Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.FD23PZ for passing config to apt-key
[2025-12-11T14:53:09.376Z] Reading package lists...
[2025-12-11T14:53:09.387Z] 
[2025-12-11T14:53:09.390Z] W: GPG error: http://security.ubuntu.com/ubuntu jammy-security InRelease: Couldn't create temporary file /tmp/apt.conf.CiOY60 for passing config to apt-key
E: The repository 'http://security.ubuntu.com/ubuntu jammy-security InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: Couldn't create temporary file /tmp/apt.conf.ohVIZQ for passing config to apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu jammy-updates InRelease: Couldn't create temporary file /tmp/apt.conf.jHdMmd for passing config to apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' is not signed.
W: GPG error: http://archive.ubuntu.com/ubuntu jammy-backports InRelease: Couldn't create temporary file /tmp/apt.conf.FD23PZ for passing config to apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-backports InRelease' is not signed.
[2025-12-11T14:53:09.390Z] ERROR: Feature "Python" (ghcr.io/devcontainers/features/python) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/python for help troubleshooting this error.

ghcr.io/devcontainers/features/common-utils will happily install stuff via apt beforehand:

[2025-12-11T15:33:12.747Z] Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 dpkg amd64 1.21.1ubuntu2.6 [1239 kB]
[2025-12-11T15:33:13.852Z] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libperl5.34 amd64 5.34.0-3ubuntu1.5 [4797 kB]
[2025-12-11T15:33:14.420Z] Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 perl amd64 5.34.0-3ubuntu1.5 [232 kB]
[2025-12-11T15:33:14.464Z] Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 perl-base amd64 5.34.0-3ubuntu1.5 [1761 kB]
[2025-12-11T15:33:14.524Z] Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 perl-modules-5.34 all 5.34.0-3ubuntu1.5 [2977 kB]
[2025-12-11T15:33:14.649Z] Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc-bin amd64 2.35-0ubuntu3.11 [706 kB]
[2025-12-11T15:33:14.667Z] Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpam0g amd64 1.4.0-11ubuntu2.6 [59.9 kB]
[2025-12-11T15:33:14.667Z] Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpam-modules-bin amd64 1.4.0-11ubuntu2.6 [37.4 kB]
[2025-12-11T15:33:14.667Z] Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpam-modules amd64 1.4.0-11ubuntu2.6 [282 kB]
[2025-12-11T15:33:14.677Z] Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsystemd0 amd64 249.11-0ubuntu3.17 [317 kB]
[2025-12-11T15:33:14.726Z] Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 logsave amd64 1.46.5-2ubuntu1.2 [10.1 kB]
[2025-12-11T15:33:14.726Z] Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libext2fs2 amd64 1.46.5-2ubuntu1.2 [208 kB]
....

Commenting ghcr.io/devcontainers/features/python:1 allows me to get as far as building the container and throwing an error when trying to run it.

I wanted to add a local feature that chmods /tmp for 1777, but I am running into the issue of the order of features being installed. Is there way to sort the features?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions