Skip to content

postCreate script failing with trivial path environment variable changes to devcontainer.json #18

@ahjulstad

Description

@ahjulstad

When specifying PATH environment variable in the devcontainer.json, for example like this:

"remoteEnv": {
	 	"PATH": "${containerEnv:PATH}"
	}

the postcreate.jl script fails.

Running the postCreateCommand from Feature 'ghcr.io/julialang/devcontainer-features/julia:1'...

[19325 ms] Start: Run in container: /bin/sh -c /usr/local/julia-devcontainer-features/postcreate.jl
[20064 ms] postCreateCommand failed with exit code 127. Skipping any further user-provided commands.
Done. Press any key to close the terminal.

MWE here:

ahjulstad/julia-devcontainer-feature-errror-minimimworkingexample@df76810

julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 12 × Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)

After startup I can run Julia or the postcreate.jl script just fine, but the language server does not start.

The resulting path if I delete the remoteEnv statement becomes:
/vscode/vscode-server/bin/linux-x64/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/home/vscode/.juliaup/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin

If I keep the remoteEnv statement
/home/vscode/.juliaup/bin:/vscode/vscode-server/bin/linux-x64/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin

Same elements, but slightly different sequence.

(The purpose of the original path setting was to make the Julia-installed python available at the command prompt, with the goal of sharing python environments across devcontainers. And if you ask, why use devcontainers at all; I am on Windows.)

Perhaps this is caused by some core devcontainer feature, I don't know...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions