Feature envvars and action `env:` options aren't passed to `docker run`
@v-Kaniska244 arbeitet bereits daran.
Seit 01.8.2025.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
It seems like envvars added by features and via the action's env: option aren't passed to docker run. VSCode does pass them to docker run. This is important for shell init scripts that expect the envvars to exist when the container is started.
Example of VSCode's behavior:
docker run --sig-proxy=false -a STDOUT -a STDERR \
`# ...` \
-e LANG=en_US.UTF-8 \
-e NVIDIA_DISABLE_REQUIRE=true \
-e CC=gcc \
-e CXX=g++ \
-e CUDAHOSTCXX=g++ \
-e PYTHON_VERSION=3.13 \
--entrypoint /bin/sh vsc-devcontainers-954e198c667c39268cc299cf82b04e5e1818c554baccfa2555269604372fc153-uid \
-c echo Container started
devcontainers/ci behavior:
docker run --sig-proxy=false -a STDOUT -a STDERR \
`# ...` \
-e LANG=en_US.UTF-8 \
-e NVIDIA_DISABLE_REQUIRE=true \
-e PYTHON_VERSION=3.13 \
--entrypoint /bin/sh vsc-devcontainers-4ec525fa91aa7d1bf05e336d30063cc11430f50413ea10c3c0d37f8fe16cb41b-uid \
-c echo Container started
Digging into the difference between their devcontainer up commands, I see VSCode isn't using --remote-env anywhere:
devcontainer up \
--user-data-folder /home/ptaylor/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data \
--container-session-data-folder /tmp/devcontainers-5417b12b-bcd8-4a49-ab65-556b2e796a371751917899255 \
--workspace-folder /home/ptaylor/dev/rapids/devcontainers \
--workspace-mount-consistency cached \
--gpu-availability detect \
--id-label devcontainer.local_folder=/home/ptaylor/dev/rapids/devcontainers \
--id-label devcontainer.config_file=/home/ptaylor/dev/rapids/devcontainers/.devcontainer/cuda12.9-pip/devcontainer.json \
--log-level debug \
--log-format json \
--config /home/ptaylor/dev/rapids/devcontainers/.devcontainer/cuda12.9-pip/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 \
--include-configuration \
--include-merged-configuration
However the devcontainers/ci action defines all the the envvars with --remote-env:
devcontainer up \
--workspace-folder /home/runner/_work/devcontainers/devcontainers \
--remote-env GITHUB_OUTPUT=/mnt/github/output \
--remote-env GITHUB_ENV=/mnt/github/env \
--remote-env GITHUB_PATH=/mnt/github/path \
--remote-env GITHUB_STEP_SUMMARY=/mnt/github/step-summary \
--config /home/runner/_work/devcontainers/devcontainers/.devcontainer/cuda12.9-conda/devcontainer.json \
--mount type=bind,source=/home/runner/_work/_temp/_runner_file_commands/set_output_fe6df713-9b89-4697-b75c-89f6f821d7dd,target=/mnt/github/output \
--mount type=bind,source=/home/runner/_work/_temp/_runner_file_commands/set_env_fe6df713-9b89-4697-b75c-89f6f821d7dd,target=/mnt/github/env \
--mount type=bind,source=/home/runner/_work/_temp/_runner_file_commands/add_path_fe6df713-9b89-4697-b75c-89f6f821d7dd,target=/mnt/github/path \
--mount type=bind,source=/home/runner/_work/_temp/_runner_file_commands/step_summary_fe6df713-9b89-4697-b75c-89f6f821d7dd,target=/mnt/github/step-summary
What do --include-configuration and/or --include-merged-configuration do? Would adding them fix this behavior in the devcontainers/ci action?
- Vorherrschende Sprache
- TypeScript
- Sterne
- 503
- Forks
- 102
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus devcontainers/ci
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
devcontainers/ci#446 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
devcontainers/ci#445 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
devcontainers/ci#444 · 4 Kommentare · 3 Reaktionen ·
-
Inputs are wrong in post step when action is called through a nested composite actionEvtl. vergeben @v-Kaniska244 hat das vor 75 Tagen übernommen. Offen
devcontainers/ci#442 · 1 zugewiesene Person ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
devcontainers/ci#437 ·
Alle Issues in devcontainers/ci
Ähnliche Issues
-
area: repo priority: P2 type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
appandflow/stim#4107 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 60/100
lingdojo/kana-dojo#32859 · 1 Kommentar · 5 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
github/gh-aw-firewall#10364 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Merge the duplicate kaffir_corn record into sorghumEvtl. vergeben @Crypto-Shroom hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Crypto-Shroom/Bird-Feed-Calculator#322 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
drizzle-team/drizzle-orm#6552 ·
Maintainer antworten meist innerhalb von 2 Tagen