Hi There,
…have to admit, that I’m a newbie.
we develop with 3 people. Our common code base is in a gitlab ci. WE develop locally. For that purpose I checked out the source code and installed docker and vscode as editor. the sourcecode includes a .devcontainer folder with configuration files such as
ivanhoe@ivanhoe-XPS-9320:~/DEV/OURPROJECT/api/.devcontainer$ ls -la
insgesamt 32
drwxrwxr-x 3 ivanhoe ivanhoe 4096 Sep 5 14:12 .
drwxrwxr-x 18 ivanhoe ivanhoe 4096 Sep 5 10:15 …
-rw-rw-r-- 1 ivanhoe ivanhoe 642 Jun 23 10:20 devcontainer.json
-rw-rw-r-- 1 ivanhoe ivanhoe 1158 Jun 23 10:20 docker-compose.yml
-rw-rw-r-- 1 ivanhoe ivanhoe 372 Jun 23 10:20 .env
-rw-rw-r-- 1 ivanhoe ivanhoe 3271 Jun 23 10:20 oauth-private.key
-rw-rw-r-- 1 ivanhoe ivanhoe 799 Jun 23 10:20 oauth-public.key
drwxrwxr-x 2 ivanhoe ivanhoe 4096 Sep 5 10:15 scripts
ivanhoe@ivanhoe-XPS-9320:~/DEV/OURPROJECT/api/.devcontainer$
When I open the vscode editor by typing
code .
in the bash in the main folder of our source code, vscode asks we wether I want to re-open in container. Having confirmed that, numerous install routines are starting that ends with error:
…
[580 ms] Start: Run: /bin/sh -c docker compose -f ‘./docker-compose.yml’ -f ‘./.devcontainer/docker-compose.yml’ build; HUID=“$(id -u)” HGID=“$(id -g)” docker compose -f ‘./docker-compose.yml’ -f ‘./.devcontainer/docker-compose.yml’ run build; docker compose -f ‘./docker-compose.yml’ -f ‘./.devcontainer/docker-compose.yml’ up phpmyadmin -d
WARN[0000] The “PMA_PORT” variable is not set. Defaulting to a blank string.
WARN[0000] The “APP_PORT” variable is not set. Defaulting to a blank string.
WARN[0000] The “HUID” variable is not set. Defaulting to a blank string.
WARN[0000] The “HGID” variable is not set. Defaulting to a blank string.
[+] Building 5.9s (7/8)
=> [queue internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [queue internal] load build definition from php.dockerfile 0.0s
=> => transferring dockerfile: 188B 0.0s
=> [php internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [php internal] load build definition from php.dockerfile 0.0s
=> => transferring dockerfile: 188B 0.0s
=> [php internal] load metadata for Docker 5.6s
=> CACHED [queue 1/3] FROM Docker 0.0s
=> ERROR [queue 2/3] RUN pecl install redis && docker-php-ext-enable 0.1s
[queue 2/3] RUN pecl install redis && docker-php-ext-enable redis && docker-php-ext-install pdo pdo_mysql:
failed to solve: process “/bin/sh -c pecl install redis && docker-php-ext-enable redis && docker-php-ext-install pdo pdo_mysql” did not complete successfully: failed to create endpoint prxm07dr5e934zbik5isdz798 on network bridge: adding interface vethc95c54e to bridge docker0 failed: Device does not exist
WARN[0000] The “PMA_PORT” variable is not set. Defaulting to a blank string.
WARN[0000] The “APP_PORT” variable is not set. Defaulting to a blank string.
ERRO[0000] error waiting for container:
Error response from daemon: failed to create endpoint api-build-run-59be3d34d729 on network api_default: adding interface vethc3a1a1a to bridge br-517eb40320ff failed: Device does not exist
WARN[0000] The “APP_PORT” variable is not set. Defaulting to a blank string.
WARN[0000] The “PMA_PORT” variable is not set. Defaulting to a blank string.
WARN[0000] The “HUID” variable is not set. Defaulting to a blank string.
WARN[0000] The “HGID” variable is not set. Defaulting to a blank string.
[+] Running 0/0
⠋ Container api-mariadb-1 Starting 0.1s
Error response from daemon: failed to create endpoint api-mariadb-1 on network api_default: adding interface veth2efb2f7 to bridge br-517eb40320ff failed: Device does not exist
[6988 ms] Error: Command failed: /bin/sh -c docker compose -f ‘./docker-compose.yml’ -f ‘./.devcontainer/docker-compose.yml’ build; HUID=“$(id -u)” HGID=“$(id -g)” docker compose -f ‘./docker-compose.yml’ -f ‘./.devcontainer/docker-compose.yml’ run build; docker compose -f ‘./docker-compose.yml’ -f ‘./.devcontainer/docker-compose.yml’ up phpmyadmin -d
[6988 ms] at NK (/home/ivanhoe/.vscode/extensions/ms-vscode-remote.remote-containers-0.304.0/dist/spec-node/devContainersSpecCLI.js:479:15)
[6988 ms] at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[6988 ms] at async mAA (/home/ivanhoe/.vscode/extensions/ms-vscode-remote.remote-containers-0.304.0/dist/spec-node/devContainersSpecCLI.js:479:3522)
[6988 ms] at async LC (/home/ivanhoe/.vscode/extensions/ms-vscode-remote.remote-containers-0.304.0/dist/spec-node/devContainersSpecCLI.js:479:4775)
[6989 ms] at async jeA (/home/ivanhoe/.vscode/extensions/ms-vscode-remote.remote-containers-0.304.0/dist/spec-node/devContainersSpecCLI.js:611:12219)
[6989 ms] at async _eA (/home/ivanhoe/.vscode/extensions/ms-vscode-remote.remote-containers-0.304.0/dist/spec-node/devContainersSpecCLI.js:611:11960)
[6994 ms] Exit code 1
[6997 ms] Command failed: /usr/share/code/code --ms-enable-electron-run-as-node /home/ivanhoe/.vscode/extensions/ms-vscode-remote.remote-containers-0.304.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/ivanhoe/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-d0e6710b-1830-406a-9daa-c7259eeffc6c1693917266753 --workspace-folder /home/ivanhoe/DEV/OURPROJECT/api --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/ivanhoe/DEV/OURPROJECT/api --id-label devcontainer.config_file=/home/ivanhoe/DEV/OURPROJECT/api/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/ivanhoe/DEV/OURPROJECT/api/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[6997 ms] Exit code 1
So seems like there is prob with the redis as well as mariadb. I had mysql and simply installed mariadb additionally. Maybe that is one prob …
When I list all containers like so:
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ec8b0a3a3cca api-php “docker-php-entrypoi…” 2 months ago Up 3 hours (healthy) 9000/tcp api-php-1
5e93930a4a04 redis:alpine “docker-entrypoint.s…” 2 months ago Up 3 hours (healthy) 6379/tcp api-redis-1
So indeed the mariadb and phpmyadmin container are missing.
Can you get me started on how to activate them ?
Thanks a lot for your help ?
Best,
Ivanhoe