microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.7k stars 1.41k forks source link

"command not found" in lifecycle script when Firefox is installed in the Ubuntu image #1551

Open nasso opened 2 years ago

nasso commented 2 years ago

I am using the Ubuntu image on Jammy (22.04). When I install the firefox package using apt-get in the Dockerfile, Node.js, which is installed using the features script defined in devcontainer.json, cannot be used from the postCreateCommand lifecycle script.

Note that:

One thing that might be related... starting from Ubuntu 22.04, firefox is a Snap package.

System information

Steps to Reproduce

  1. Clone https://github.com/nasso/dev-container-jammy-with-node in a container volume
  2. See the error when the postCreateCommand tries to run node -v
skyf0l commented 2 years ago

The steps to reproduce also lead to this bug on my computer.

image

joshspicer commented 2 years ago

Interesting, seems i'm hitting this too (testing in Codespaces) with your example repo. Will dig it a bit more!

joshspicer commented 2 years ago

The path does indeed look different when including/removing firefox 🤔

image image