Skip to content
This repository was archived by the owner on Jan 12, 2025. It is now read-only.
This repository was archived by the owner on Jan 12, 2025. It is now read-only.

[Bug]: Failed to build ansible feature #607

@svicervlad

Description

@svicervlad

Feature id and version

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

Devcontainer base Image

mcr.microsoft.com/devcontainers/base:bullseye

What happened?

Failed to build devcontainer with ansible feature

Also reproduced on mcr.microsoft.com/devcontainers/base:bookworm and mcr.microsoft.com/devcontainers/base:jammy base image

Reproduced on docker desktop and github codespace

devcontainer.json:

{
	"name": "myproject",
	"image": "mcr.microsoft.com/devcontainers/base:bullseye",
	"features": {
		"ghcr.io/devcontainers-contrib/features/ansible:2": {},
		"ghcr.io/hspaans/devcontainer-features/ansible-lint:1": {}
	},
	// Configure tool-specific properties.
	"customizations": {
		"vscode": {
			"extensions": [
				"redhat.ansible",
				"DavidAnson.vscode-markdownlint",
			],
			"settings": {
				"editor.tabSize": 2,
				"files.trimTrailingWhitespace": true,
				"files.insertFinalNewline": true,
				"files.associations": {
				  "ansible/playbook.yml": "ansible",
				  "ansible/tasks/*.yml": "ansible",
				},
				"ansible.python.interpreterPath": "/usr/bin/python3"
			}
		}
	}
}

Relevant log output

[2024-06-03T05:58:11.076Z]  installing pipx

��� installing pipx

��� installing pipx

��� installing pipx

  installed package pipx 1.6.0, installed using Python 3.9.2

#0 21.45   These apps are now globally available

#0 21.45     - pipx

#0 21.45 done! ��� ���� ���

#0 21.45 Updating /etc/bash.bashrc

#0 21.47 Updating /etc/zsh/zshrc

#0 21.47 Updating /etc/bash.bashrc

#0 21.48 Updating /etc/zsh/zshrc

#0 21.48 Updating /etc/bash.bashrc

#0 21.48 Updating /etc/zsh/zshrc

#0 21.60 

��� creating virtual environment



��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

��� installing ansible-core

  installed package ansible-core 2.15.12, installed using Python 3.9.2

#0 25.20   These apps are now globally available

#0 25.20     - ansible

#0 25.20     - ansible-config

#0 25.20     - ansible-connection

#0 25.20     - ansible-console

#0 25.20     - ansible-doc

#0 25.20     - ansible-galaxy

#0 25.20     - ansible-inventory

#0 25.20     - ansible-playbook

#0 25.20     - ansible-pull

#0 25.20     - ansible-test

#0 25.20     - ansible-vault

#0 25.20 done! ��� ���� ���

#0 25.20 usage: pipx [-h] [--quiet] [--verbose] [--global] [--version]

#0 25.34             {install,install-all,uninject,inject,pin,unpin,upgrade,upgrade-all,upgrade-shared,uninstall,uninstall-all,reinstall,reinstall-all,list,interpreter,run,runpip,ensurepath,environment,completions}

#0 25.34             ...

#0 25.34 pipx: error: unrecognized arguments: ansible

#0 25.34 Traceback (most recent call last):
#0 25.41   File "<string>", line 1, in <module>
#0 25.41   File "nanolayer.__main__", line 50, in main
#0 25.41   File "typer.main", line 328, in __call__
#0 25.41   File "typer.main", line 311, in __call__
#0 25.41   File "click.core", line 1157, in __call__
#0 25.41   File "typer.core", line 778, in main
#0 25.41   File "typer.core", line 216, in _main
#0 25.41   File "click.core", line 1688, in invoke
#0 25.41   File "click.core", line 1688, in invoke
#0 25.41   File "click.core", line 1434, in invoke
#0 25.41   File "click.core", line 783, in invoke
#0 25.41   File "typer.main", line 683, in wrapper
#0 25.41   File "nanolayer.cli.install", line 65, in install_devcontainer_feature
#0 25.41   File "nanolayer.installers.devcontainer_feature.oci_feature_installer", line 131, in install
#0 25.41   File "nanolayer.utils.invoker", line 59, in invoke
#0 25.41 nanolayer.utils.invoker.Invoker.InvokerException: The command 'cd /tmp/tmpz9yvvxtb && chmod +x -R . && _REMOTE_USER="vscode" _REMOTE_USER_HOME="/home/vscode" PACKAGE="ansible-core" INJECTIONS="ansible" VERSION="latest" INCLUDEDEPS="false" INTERPRETER
[2024-06-03T05:58:11.078Z] ="" NANOLAYER_VERBOSE="" NANOLAYER_FORCE_CLI_INSTALLATION="" NANOLAYER_PROPAGATE_CLI_LOCATION="1" NANOLAYER_CLI_LOCATION="/tmp/nanolayer-PEnVPNP7SD/nanolayer" bash  -i  +H ./install.sh' failed. error: Return Code: 2. see logs for details.
#0 25.55 ERROR: Feature "Ansible (via pipx)" (ghcr.io/devcontainers-contrib/features/ansible) failed to install! Look at the documentation at https://github.com/devcontainers-contrib/features/tree/main/src/ansible for help troubleshooting this error.
------
Dockerfile.extended:24
--------------------
  23 |     
  24 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=ansible_0,target=/tmp/build-features-src/ansible_0 \
  25 | >>>     cp -ar /tmp/build-features-src/ansible_0 /tmp/dev-container-features \
  26 | >>>  && chmod -R 0755 /tmp/dev-container-features/ansible_0 \
  27 | >>>  && cd /tmp/dev-container-features/ansible_0 \
  28 | >>>  && chmod +x ./devcontainer-features-install.sh \
  29 | >>>  && ./devcontainer-features-install.sh \
  30 | >>>  && rm -rf /tmp/dev-container-features/ansible_0
  31 |     
--------------------
error: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/ansible_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/ansible_0  && cd /tmp/dev-container-features/ansible_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/ansible_0" did not complete successfully: exit code: 1
[2024-06-03T05:58:11.082Z] Stop (45861 ms): Run: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.59.1-1717394242033 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-waiver-ci-be709c987bcf9f61ed38bd03753198198be9ab80760015a82bc8e3de4a631747-features -f /tmp/devcontainercli-root/container-features/0.59.1-1717394242033/Dockerfile.extended /tmp/devcontainercli-root/empty-folder
[2024-06-03T05:58:11.120Z] Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.59.1-1717394242033 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-waiver-ci-be709c987bcf9f61ed38bd03753198198be9ab80760015a82bc8e3de4a631747-features -f /tmp/devcontainercli-root/container-features/0.59.1-1717394242033/Dockerfile.extended /tmp/devcontainercli-root/empty-folder
[2024-06-03T05:58:11.121Z]     at ptA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js:464:1260)
[2024-06-03T05:58:11.121Z]     at NH (/root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js:464:1002)
[2024-06-03T05:58:11.121Z]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2024-06-03T05:58:11.121Z]     at async KtA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js:481:3692)
[2024-06-03T05:58:11.121Z]     at async $C (/root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js:481:4807)
[2024-06-03T05:58:11.121Z]     at async hrA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js:661:13255)
[2024-06-03T05:58:11.121Z]     at async lrA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js:661:12996)
[2024-06-03T05:58:11.184Z] Stop (52960 ms): Run in container: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-e0457c35-8bdb-4028-9ccd-cf9fe4f952021717394190215 --workspace-folder /workspaces/waiver-ci --workspace-mount-consistency cached --id-label vsch.local.repository=git@github.com:ynorth-projects/waiver-ci.git --id-label vsch.local.repository.volume=new-dsc --id-label vsch.local.repository.folder=waiver-ci --id-label devcontainer.config_file=/workspaces/waiver-ci/.devcontainer/devcontainer.json --log-level debug --log-format json --config /workspaces/waiver-ci/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-a13b9e6e-f752-44a5-802d-a340b7cfbb4c.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=new-dsc,target=/workspaces,external=true --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default off --mount-workspace-git-root --terminal-columns 130 --terminal-rows 29
[2024-06-03T05:58:11.184Z] Exit code 1
[2024-06-03T05:58:11.184Z] Start: Run: docker rm -f b890c459744ab605ee7e5a712f9b3fcc6f89c6962cbc9fe0492b06caa9b257ca
[2024-06-03T05:58:11.190Z] Command failed: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.362.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-e0457c35-8bdb-4028-9ccd-cf9fe4f952021717394190215 --workspace-folder /workspaces/waiver-ci --workspace-mount-consistency cached --id-label vsch.local.repository=git@github.com:ynorth-projects/waiver-ci.git --id-label vsch.local.repository.volume=new-dsc --id-label vsch.local.repository.folder=waiver-ci --id-label devcontainer.config_file=/workspaces/waiver-ci/.devcontainer/devcontainer.json --log-level debug --log-format json --config /workspaces/waiver-ci/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-a13b9e6e-f752-44a5-802d-a340b7cfbb4c.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=new-dsc,target=/workspaces,external=true --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default off --mount-workspace-git-root --terminal-columns 130 --terminal-rows 29
[2024-06-03T05:58:11.190Z] Exit code 1
[2024-06-03T05:58:12.752Z] Stop (82880 ms): Run in container: /bin/sh
[2024-06-03T05:58:12.752Z] Container server terminated (code: 137, signal: null).
[2024-06-03T05:58:12.753Z] Stop (85420 ms): Run in container: /bin/sh
[2024-06-03T05:58:12.815Z] Stop (1631 ms): Run: docker rm -f b890c459744ab605ee7e5a712f9b3fcc6f89c6962cbc9fe0492b06caa9b257ca
[2024-06-03T05:58:21.826Z] Start: Run: docker volume ls -q
[2024-06-03T05:58:22.920Z] Stop (1094 ms): Run: docker volume ls -q
[2024-06-03T05:58:22.921Z] Getting Docker parameters for own remote.
[2024-06-03T05:58:22.976Z] Start: Run: docker version --format {{json .}}
[2024-06-03T05:58:24.135Z] {"Client":{"CloudIntegration":"v1.0.35","Version":"24.0.2","ApiVersion":"1.43","DefaultAPIVersion":"1.43","GitCommit":"cb74dfc","GoVersion":"go1.20.4","Os":"darwin","Arch":"arm64","BuildTime":"Thu May 25 21:51:16 2023","Context":"do"},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"24.0.4","Details":{"ApiVersion":"1.43","Arch":"amd64","BuildTime":"Fri Jul  7 14:50:55 2023","Experimental":"false","GitCommit":"4ffc614","GoVersion":"go1.20.5","KernelVersion":"5.15.0-58-generic","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"1.6.9","Details":{"GitCommit":"1c90a442489720eec95342e1789ee8a5e1b9536f"}},{"Name":"runc","Version":"1.1.4","Details":{"GitCommit":"v1.1.4-0-g5fd4c4d"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"24.0.4","ApiVersion":"1.43","MinAPIVersion":"1.12","GitCommit":"4ffc614","GoVersion":"go1.20.5","Os":"linux","Arch":"amd64","KernelVersion":"5.15.0-58-generic","BuildTime":"2023-07-07T14:50:55.000000000+00:00"}}
[2024-06-03T05:58:24.137Z] Stop (1161 ms): Run: docker version --format {{json .}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions