Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

devcontainer will not start: 'buildx' is not a docker command

オープン
#508 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
docker, docker-compose, shell, vscode

調査の方向性

まず Flatpak のオーバーライドと settings.json 内のパスを確認し、その後、報告されている docker buildx version の失敗を再現します。.devcontainer/docker-compose.yml と、文書化されているホスト起動スクリプトを確認します。Flatpak 内で devcontainer が、報告されている buildx エラーや起動時のハングなしに正常に起動すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

It would be good to improve the documentation and the default experience for using devcontainers. I've made progress, but it doesn't seem like I have a working setup yet.

I have done the following in the process of trying to make it work in the flatpak (which appear to all be necessary to have got to this point):

Exposed /run/docker.sock to the container with:

flatpak override --user --filesystem=/run/docker.sock com.visualstudio.code

Changed the paths to docker and docker-compose in my settings.json, i.e.:

    "dev.containers.dockerComposePath": "/run/host/usr/bin/docker-compose",
    "dev.containers.dockerPath": "/run/host/usr/bin/docker",

But the devcontainer will not start because it cannot find buildx:

[918 ms] @devcontainers/cli 0.56.2. Node.js v18.17.1. linux 6.8.1-arch1-1 x64.
[918 ms] Start: Run: /run/host/usr/bin/docker buildx version
[931 ms] 
[931 ms] docker: 'buildx' is not a docker command.
See 'docker --help'

[931 ms] Exit code 1

I've also tried adding a link from /usr/bin to docker-buildx (there was already one there for docker-compose).

If I open an integrated terminal, I can reproduce the failure with:

$ /run/host/bin/docker buildx version
docker: 'buildx' is not a docker command.
See 'docker --help'

And then I got it to work by creating scripts in /usr/local/bin that I point to in my settings.json:

    "dev.containers.dockerComposePath": "/run/host/usr/local/bin/in-flatpak-do-host-spawn_docker-compose",
    "dev.containers.dockerPath": "/run/host/usr/local/bin/in-flatpak-do-host-spawn_docker",

The file contents are as follows:
/usr/local/bin/in-flatpak-do-host-spawn_docker

#!/bin/bash

/app/bin/host-spawn docker "$@"

/usr/local/bin/in-flatpak-do-host-spawn_docker-compose

#!/bin/bash

/app/bin/host-spawn docker-compose "$@"

But then the devcontainer startup process seems to hang here:

[1650 ms] Start: Run: /run/host/usr/local/bin/in-flatpak-do-host-spawn_docker-compose --project-name 28th-ces_devcontainer -f /home/sean/Making/RoleModel/28th-ces/.devcontainer/docker-compose.yml -f /home/sean/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1710714627644.yml -f /home/sean/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.containerFeatures-1710714765504.yml up -d --no-recreate
[+] Running 3/3
 ✔ Container 28th-ces_devcontainer-app-1    Started                        0.0s 
 ✔ Container 28th-ces_devcontainer-db-1     Running                        0.0s 
 ✔ Container 28th-ces_devcontainer-cache-1  Running                        0.0s 
[1985 ms] Start: Run: /run/host/usr/local/bin/in-flatpak-do-host-spawn_docker ps -q -a --filter label=com.docker.compose.project=28th-ces_devcontainer --filter label=com.docker.compose.service=app
[2021 ms] Start: Run: /run/host/usr/local/bin/in-flatpak-do-host-spawn_docker inspect --type container ab765af91650
[2062 ms] Start: Inspecting container
[2062 ms] Start: Run: /run/host/usr/local/bin/in-flatpak-do-host-spawn_docker inspect --type container ab765af916503e0639de70401328005369601b9e56890d74a52c0a9fab5e9139
[2104 ms] Start: Run in container: /bin/sh
[2112 ms] Start: Run in container: uname -m
主要言語
Shell
スター
216
フォーク
82
平均マージ
1日 7時間
マージ済み PR(30日)
1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flathub/com.visualstudio.code のほかの issue

flathub/com.visualstudio.code の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。