devcontainers-contrib / features

🐳 Extra add-in features for Devcontainers and GitHub Codespaces
MIT License
224 stars 116 forks source link

[Bug]: Ansible feature does not work with Debian Bookworm dev container #463

Closed brizdotdev closed 1 year ago

brizdotdev commented 1 year ago

Feature id and version

ghcr.io/devcontainers-contrib/features/ansible:2

Devcontainer base Image

mcr.microsoft.com/devcontainers/base:bookworm

What happened?

Ansible fails to install with devcontainers/base:bookworm but works fine with devcontainers/base:bullseye.

Relevant log output

> [dev_containers_target_stage 4/6] RUN --mount=type=bind,from=dev_containers_f
eature_content_source,source=ansible_3,target=/tmp/build-features-src/ansible_3
    cp -ar /tmp/build-features-src/ansible_3 /tmp/dev-container-features  && chm
od -R 0755 /tmp/dev-container-features/ansible_3  && cd /tmp/dev-container-featu
res/ansible_3  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer
-features-install.sh  && rm -rf /tmp/dev-container-features/ansible_3:
#0 0.382 =======================================================================
====
#0 0.382 Feature       : Ansible (via pipx)
#0 0.382 Description   : Ansible is a suite of software tools that enables infra
structure as code.
#0 0.382 Id            : ghcr.io/devcontainers-contrib/features/ansible
#0 0.382 Version       : 2.0.15
#0 0.382 Documentation : http://github.com/devcontainers-contrib/features/tree/m
ain/src/ansible
#0 0.382 Options       :
#0 0.382     VERSION="latest"
#0 0.382 =======================================================================
====
#0 0.385 bash: cannot set terminal process group (1): Inappropriate ioctl for de
vice
#0 0.385 bash: no job control in this shell
#0 4.178 nanolayer
#0 9.029 cd /tmp/tmp14o056a2 && chmod +x -R . && _REMOTE_USER="vscode" _REMOTE_U
SER_HOME="/home/vscode" PACKAGE="ansible-core" INJECTIONS="ansible" VERSION="lat
est" NANOLAYER_VERBOSE="" NANOLAYER_FORCE_CLI_INSTALLATION="" NANOLAYER_PROPAGAT
E_CLI_LOCATION="1" NANOLAYER_CLI_LOCATION="/tmp/nanolayer-r6lSYWxM8x/nanolayer"
bash  -i  +H ./install.sh
#0 9.029 installing python3-minimal libffi-dev
Get:1 http://deb.debian.org/debian bookworm InRelease [147 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB
]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8904 kB]
Get:5 http://deb.debian.org/debian-security bookworm-security/main amd64 Package
s [30.4 kB]
Fetched 9182 kB in 2s (3889 kB/s)
Reading package lists... Done
Reading package lists... Done
[2023-06-23T00:32:25.805Z] 
Building dependency tree... Done
Reading state information... Done
#0 12.71 The following additional packages will be installed:
#0 12.71   libpython3.11-minimal libpython3.11-stdlib media-types python3.11
#0 12.71   python3.11-minimal
#0 12.71 Suggested packages:
#0 12.71   python3.11-venv python3.11-doc binfmt-support
#0 12.78 The following NEW packages will be installed:
#0 12.78   libpython3.11-minimal libpython3.11-stdlib media-types python3-minima
l
#0 12.78   python3.11 python3.11-minimal
#0 12.78 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
#0 12.78 Need to get 5298 kB of archives.
#0 12.78 After this operation, 21.6 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 libpython3.11-minimal amd
64 3.11.2-6 [813 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 python3.11-minimal amd64
3.11.2-6 [2064 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 python3-minimal amd64 3.1
1.2-1+b1 [26.3 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 media-types all 10.0.0 [2
6.1 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 libpython3.11-stdlib amd6
4 3.11.2-6 [1796 kB]
Get:6 http://deb.debian.org/debian bookworm/main amd64 python3.11 amd64 3.11.2-6
 [572 kB]
Fetched 5298 kB in 1s (8773 kB/s)
#0 13.60 debconf: unable to initialize frontend: Dialog
#0 13.60 debconf: (TERM is not set, so the dialog frontend is not usable.)
#0 13.60 debconf: falling back to frontend: Readline
#0 14.24 Selecting previously unselected package libpython3.11-minimal:amd64.
(Reading database ... 23902 files and directories currently installed.)
#0 14.35 Preparing to unpack .../libpython3.11-minimal_3.11.2-6_amd64.deb ...
#0 14.36 Unpacking libpython3.11-minimal:amd64 (3.11.2-6) ...
#0 14.49 Selecting previously unselected package python3.11-minimal.
#0 14.49 Preparing to unpack .../python3.11-minimal_3.11.2-6_amd64.deb ...
#0 14.50 Unpacking python3.11-minimal (3.11.2-6) ...
#0 14.75 Setting up libpython3.11-minimal:amd64 (3.11.2-6) ...
#0 14.78 Setting up python3.11-minimal (3.11.2-6) ...
#0 15.50 Selecting previously unselected package python3-minimal.
(Reading database ... 24209 files and directories currently installed.)
#0 15.51 Preparing to unpack .../python3-minimal_3.11.2-1+b1_amd64.deb ...
#0 15.52 Unpacking python3-minimal (3.11.2-1+b1) ...
#0 15.56 Selecting previously unselected package media-types.
#0 15.56 Preparing to unpack .../media-types_10.0.0_all.deb ...
#0 15.57 Unpacking media-types (10.0.0) ...
#0 15.62 Selecting previously unselected package libpython3.11-stdlib:amd64.
#0 15.62 Preparing to unpack .../libpython3.11-stdlib_3.11.2-6_amd64.deb ...
#0 15.62 Unpacking libpython3.11-stdlib:amd64 (3.11.2-6) ...
#0 15.82 Selecting previously unselected package python3.11.
#0 15.82 Preparing to unpack .../python3.11_3.11.2-6_amd64.deb ...
#0 15.83 Unpacking python3.11 (3.11.2-6) ...
#0 16.05 Setting up media-types (10.0.0) ...
#0 16.08 Setting up libpython3.11-stdlib:amd64 (3.11.2-6) ...
#0 16.10 Setting up python3-minimal (3.11.2-1+b1) ...
#0 16.24 Setting up python3.11 (3.11.2-6) ...
#0 16.93 Processing triggers for man-db (2.11.2-2) ...
#0 17.82 installing python3-pip
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
#0 19.29 The following additional packages will be installed:
#0 19.29   javascript-common libjs-jquery libjs-sphinxdoc libjs-underscore
#0 19.29   libpython3-dev libpython3-stdlib libpython3.11 libpython3.11-dev pyth
on3
#0 19.29   python3-dev python3-distutils python3-lib2to3 python3-pkg-resources
#0 19.29   python3-setuptools python3-wheel python3.11-dev
#0 19.29 Suggested packages:
#0 19.29   apache2 | lighttpd | httpd python3-doc python3-tk python3-venv
#0 19.29   python-setuptools-doc
#0 19.45 The following NEW packages will be installed:
#0 19.45   javascript-common libffi-dev libjs-jquery libjs-sphinxdoc libjs-under
score
#0 19.45   libpython3-dev libpython3-stdlib libpython3.11 libpython3.11-dev pyth
on3
#0 19.45   python3-dev python3-distutils python3-lib2to3 python3-pip
#0 19.45   python3-pkg-resources python3-setuptools python3-wheel python3.11-dev
#0 19.46 0 upgraded, 18 newly installed, 0 to remove and 0 not upgraded.
#0 19.46 Need to get 10.4 MB of archives.
#0 19.46 After this operation, 48.4 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 libpython3-stdlib amd64 3
.11.2-1+b1 [9312 B]
Get:2 http://deb.debian.org/debian bookworm/main amd64 python3 amd64 3.11.2-1+b1
 [26.3 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 javascript-common all 11+
nmu1 [6260 B]
Get:4 http://deb.debian.org/debian bookworm/main amd64 libffi-dev amd64 3.4.4-1
[59.4 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 libjs-jquery all 3.6.1+df
sg+~3.5.14-1 [326 kB]
Get:6 http://deb.debian.org/debian bookworm/main amd64 libjs-underscore all 1.13
.4~dfsg+~1.11.4-3 [116 kB]
Get:7 http://deb.debian.org/debian bookworm/main amd64 libjs-sphinxdoc all 5.3.0
-4 [130 kB]
Get:8 http://deb.debian.org/debian bookworm/main amd64 libpython3.11 amd64 3.11.
2-6 [1988 kB]
Get:9 http://deb.debian.org/debian bookworm/main amd64 libpython3.11-dev amd64 3
.11.2-6 [4738 kB]
Get:10 http://deb.debian.org/debian bookworm/main amd64 libpython3-dev amd64 3.1
1.2-1+b1 [9572 B]
Get:11 http://deb.debian.org/debian bookworm/main amd64 python3.11-dev amd64 3.1
1.2-6 [615 kB]
Get:12 http://deb.debian.org/debian bookworm/main amd64 python3-lib2to3 all 3.11
.2-3 [76.3 kB]
Get:13 http://deb.debian.org/debian bookworm/main amd64 python3-distutils all 3.
11.2-3 [131 kB]
Get:14 http://deb.debian.org/debian bookworm/main amd64 python3-dev amd64 3.11.2
-1+b1 [26.2 kB]
Get:15 http://deb.debian.org/debian bookworm/main amd64 python3-pkg-resources al
l 66.1.1-1 [296 kB]
Get:16 http://deb.debian.org/debian bookworm/main amd64 python3-setuptools all 6
6.1.1-1 [521 kB]
Get:17 http://deb.debian.org/debian bookworm/main amd64 python3-wheel all 0.38.4
-2 [30.8 kB]
Get:18 http://deb.debian.org/debian bookworm/main amd64 python3-pip all 23.0.1+d
fsg-1 [1325 kB]
Fetched 10.4 MB in 1s (8043 kB/s)
#0 20.87 debconf: unable to initialize frontend: Dialog
#0 20.87 debconf: (TERM is not set, so the dialog frontend is not usable.)
#0 20.87 debconf: falling back to frontend: Readline
#0 21.38 Selecting previously unselected package libpython3-stdlib:amd64.
(Reading database ... 24613 files and directories currently installed.)
#0 21.39 Preparing to unpack .../00-libpython3-stdlib_3.11.2-1+b1_amd64.deb ...
#0 21.40 Unpacking libpython3-stdlib:amd64 (3.11.2-1+b1) ...
#0 21.50 Selecting previously unselected package python3.
#0 21.51 Preparing to unpack .../01-python3_3.11.2-1+b1_amd64.deb ...
#0 21.53 Unpacking python3 (3.11.2-1+b1) ...
#0 21.64 Selecting previously unselected package javascript-common.
#0 21.64 Preparing to unpack .../02-javascript-common_11+nmu1_all.deb ...
#0 21.66 Unpacking javascript-common (11+nmu1) ...
#0 21.72 Selecting previously unselected package libffi-dev:amd64.
#0 21.73 Preparing to unpack .../03-libffi-dev_3.4.4-1_amd64.deb ...
#0 21.74 Unpacking libffi-dev:amd64 (3.4.4-1) ...
#0 21.83 Selecting previously unselected package libjs-jquery.
#0 21.83 Preparing to unpack .../04-libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ..
.
#0 21.85 Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ...
#0 21.92 Selecting previously unselected package libjs-underscore.
#0 21.92 Preparing to unpack .../05-libjs-underscore_1.13.4~dfsg+~1.11.4-3_all.d
eb ...
#0 21.93 Unpacking libjs-underscore (1.13.4~dfsg+~1.11.4-3) ...
#0 21.99 Selecting previously unselected package libjs-sphinxdoc.
#0 21.99 Preparing to unpack .../06-libjs-sphinxdoc_5.3.0-4_all.deb ...
#0 22.00 Unpacking libjs-sphinxdoc (5.3.0-4) ...
#0 22.07 Selecting previously unselected package libpython3.11:amd64.
#0 22.08 Preparing to unpack .../07-libpython3.11_3.11.2-6_amd64.deb ...
#0 22.09 Unpacking libpython3.11:amd64 (3.11.2-6) ...
#0 22.30 Selecting previously unselected package libpython3.11-dev:amd64.
#0 22.30 Preparing to unpack .../08-libpython3.11-dev_3.11.2-6_amd64.deb ...
#0 22.31 Unpacking libpython3.11-dev:amd64 (3.11.2-6) ...
#0 22.76 Selecting previously unselected package libpython3-dev:amd64.
#0 22.76 Preparing to unpack .../09-libpython3-dev_3.11.2-1+b1_amd64.deb ...
#0 22.76 Unpacking libpython3-dev:amd64 (3.11.2-1+b1) ...
#0 22.81 Selecting previously unselected package python3.11-dev.
#0 22.81 Preparing to unpack .../10-python3.11-dev_3.11.2-6_amd64.deb ...
#0 22.82 Unpacking python3.11-dev (3.11.2-6) ...
#0 22.87 Selecting previously unselected package python3-lib2to3.
#0 22.87 Preparing to unpack .../11-python3-lib2to3_3.11.2-3_all.deb ...
#0 22.88 Unpacking python3-lib2to3 (3.11.2-3) ...
#0 22.96 Selecting previously unselected package python3-distutils.
#0 22.96 Preparing to unpack .../12-python3-distutils_3.11.2-3_all.deb ...
#0 22.97 Unpacking python3-distutils (3.11.2-3) ...
#0 23.04 Selecting previously unselected package python3-dev.
#0 23.04 Preparing to unpack .../13-python3-dev_3.11.2-1+b1_amd64.deb ...
#0 23.05 Unpacking python3-dev (3.11.2-1+b1) ...
#0 23.13 Selecting previously unselected package python3-pkg-resources.
#0 23.14 Preparing to unpack .../14-python3-pkg-resources_66.1.1-1_all.deb ...
#0 23.14 Unpacking python3-pkg-resources (66.1.1-1) ...
#0 23.23 Selecting previously unselected package python3-setuptools.
#0 23.24 Preparing to unpack .../15-python3-setuptools_66.1.1-1_all.deb ...
#0 23.25 Unpacking python3-setuptools (66.1.1-1) ...
#0 23.35 Selecting previously unselected package python3-wheel.
#0 23.35 Preparing to unpack .../16-python3-wheel_0.38.4-2_all.deb ...
#0 23.36 Unpacking python3-wheel (0.38.4-2) ...
#0 23.40 Selecting previously unselected package python3-pip.
#0 23.40 Preparing to unpack .../17-python3-pip_23.0.1+dfsg-1_all.deb ...
#0 23.41 Unpacking python3-pip (23.0.1+dfsg-1) ...
#0 23.58 Setting up javascript-common (11+nmu1) ...
#0 23.62 Setting up libpython3.11:amd64 (3.11.2-6) ...
#0 23.65 Setting up libffi-dev:amd64 (3.4.4-1) ...
#0 23.67 Setting up libpython3.11-dev:amd64 (3.11.2-6) ...
#0 23.70 Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ...
#0 23.73 Setting up libpython3-stdlib:amd64 (3.11.2-1+b1) ...
#0 23.75 Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ...
#0 23.77 Setting up libpython3-dev:amd64 (3.11.2-1+b1) ...
#0 23.80 Setting up python3.11-dev (3.11.2-6) ...
#0 23.83 Setting up python3 (3.11.2-1+b1) ...
#0 23.85 running python rtupdate hooks for python3.11...
#0 23.85 running python post-rtupdate hooks for python3.11...
#0 23.95 Setting up libjs-sphinxdoc (5.3.0-4) ...
#0 23.97 Setting up python3-lib2to3 (3.11.2-3) ...
#0 24.07 Setting up python3-pkg-resources (66.1.1-1) ...
#0 24.33 Setting up python3-distutils (3.11.2-3) ...
[2023-06-23T00:32:25.835Z] 
#0 24.46 Setting up python3-setuptools (66.1.1-1) ...
#0 24.91 Setting up python3-wheel (0.38.4-2) ...
#0 25.04 Setting up python3-dev (3.11.2-1+b1) ...
#0 25.07 Setting up python3-pip (23.0.1+dfsg-1) ...
#0 26.02 Processing triggers for man-db (2.11.2-2) ...
#0 26.89 Processing triggers for libc-bin (2.36-9) ...
#0 26.97 installing python3-venv
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
#0 28.36 The following additional packages will be installed:
#0 28.36   python3-pip-whl python3-setuptools-whl python3.11-venv
#0 28.42 The following NEW packages will be installed:
#0 28.42   python3-pip-whl python3-setuptools-whl python3-venv python3.11-venv
#0 28.43 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
#0 28.43 Need to get 2836 kB of archives.
#0 28.43 After this operation, 3170 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 python3-pip-whl all 23.0.
1+dfsg-1 [1717 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 python3-setuptools-whl al
l 66.1.1-1 [1111 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 python3.11-venv amd64 3.1
1.2-6 [5892 B]
Get:4 http://deb.debian.org/debian bookworm/main amd64 python3-venv amd64 3.11.2
-1+b1 [1200 B]
Fetched 2836 kB in 0s (8001 kB/s)
#0 28.94 debconf: unable to initialize frontend: Dialog
#0 28.94 debconf: (TERM is not set, so the dialog frontend is not usable.)
#0 28.94 debconf: falling back to frontend: Readline
#0 29.45 Selecting previously unselected package python3-pip-whl.
(Reading database ... 26122 files and directories currently installed.)
#0 29.46 Preparing to unpack .../python3-pip-whl_23.0.1+dfsg-1_all.deb ...
#0 29.47 Unpacking python3-pip-whl (23.0.1+dfsg-1) ...
#0 29.63 Selecting previously unselected package python3-setuptools-whl.
#0 29.63 Preparing to unpack .../python3-setuptools-whl_66.1.1-1_all.deb ...
#0 29.64 Unpacking python3-setuptools-whl (66.1.1-1) ...
#0 29.77 Selecting previously unselected package python3.11-venv.
#0 29.77 Preparing to unpack .../python3.11-venv_3.11.2-6_amd64.deb ...
#0 29.78 Unpacking python3.11-venv (3.11.2-6) ...
#0 29.86 Selecting previously unselected package python3-venv.
#0 29.86 Preparing to unpack .../python3-venv_3.11.2-1+b1_amd64.deb ...
#0 29.87 Unpacking python3-venv (3.11.2-1+b1) ...
#0 29.94 Setting up python3-setuptools-whl (66.1.1-1) ...
#0 29.97 Setting up python3-pip-whl (23.0.1+dfsg-1) ...
#0 30.00 Setting up python3.11-venv (3.11.2-6) ...
#0 30.07 Setting up python3-venv (3.11.2-1+b1) ...
#0 30.56 error: externally-managed-environment
#0 30.56
#0 30.56 �� This environment is externally managed
#0 30.56 ������> To install Python packages system-wide, try apt install
#0 30.56     python3-xyz, where xyz is the package you are trying to
#0 30.56     install.
#0 30.56    
#0 30.56     If you wish to install a non-Debian-packaged Python package,
#0 30.56     create a virtual environment using python3 -m venv path/to/venv.
#0 30.56     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
#0 30.56     sure you have python3-full installed.
#0 30.56    
#0 30.56     If you wish to install a non-Debian packaged Python application,
#0 30.56     it may be easiest to use pipx install xyz, which will manage a
#0 30.56     virtual environment for you. Make sure you have pipx installed.
#0 30.56    
#0 30.56     See /usr/share/doc/python3.11/README.venv for more information.
#0 30.56
#0 30.56 note: If you believe this is a mistake, please contact your Python inst
allation or OS distribution provider. You can override this, at the risk of brea
king your Python installation or OS, by passing --break-system-packages.
#0 30.56 hint: See PEP 668 for the detailed specification.
#0 30.69 Traceback (most recent call last):
#0 30.69   File "<string>", line 1, in <module>
#0 30.69   File "nanolayer.__main__", line 50, in main
#0 30.69   File "typer.main", line 328, in __call__
#0 30.69   File "typer.main", line 311, in __call__
#0 30.69   File "click.core", line 1130, in __call__
#0 30.69   File "typer.core", line 778, in main
#0 30.69   File "typer.core", line 216, in _main
#0 30.69   File "click.core", line 1657, in invoke
#0 30.69   File "click.core", line 1657, in invoke
#0 30.69   File "click.core", line 1404, in invoke
#0 30.69   File "click.core", line 760, in invoke
#0 30.69   File "typer.main", line 683, in wrapper
#0 30.69   File "nanolayer.cli.install", line 64, in install_devcontainer_featur
e
#0 30.69   File "nanolayer.installers.devcontainer_feature.oci_feature_installer
", line 131, in install
#0 30.69   File "nanolayer.utils.invoker", line 56, in invoke
#0 30.69 nanolayer.utils.invoker.Invoker.InvokerException: The command 'cd /tmp/
tmp14o056a2 && chmod +x -R . && _REMOTE_USER="vscode" _REMOTE_USER_HOME="/home/v
scode" PACKAGE="ansible-core" INJECTIONS="ansible" VERSION="latest" NANOLAYER_VE
RBOSE="" NANOLAYER_FORCE_CLI_INSTALLATION="" NANOLAYER_PROPAGATE_CLI_LOCATION="1
" NANOLAYER_CLI_LOCATION="/tmp/nanolayer-r6lSYWxM8x/nanolayer" bash  -i  +H ./in
stall.sh' failed. error: Return Code: 1. see logs for details.
#0 30.79 Sentry is attempting to send 2 pending error messages
#0 30.79 Waiting up to 2 seconds
#0 30.79 Press Ctrl-C to quit
#0 30.92 ERROR: Feature "Ansible (via pipx)" (ghcr.io/devcontainers-contrib/feat
ures/ansible) failed to install! Look at the documentation at http://github.com/
devcontainers-contrib/features/tree/main/src/ansible for help troubleshooting th
is error.
danielbraun89 commented 1 year ago

@brizdotdev thanks for reporting! This was a bug in handling of PEP 668 , should be fixed for ansible and all other pip dependant features , in PR #470

specifically for ansible the latest version should now work : ghcr.io/devcontainers-contrib/features/ansible:2.0.16

danielbraun89 commented 1 year ago

Closing as fixed, If this problem comes back comment and Ill reopen