vscode-dev-containers icon indicating copy to clipboard operation
vscode-dev-containers copied to clipboard

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

Open nasso opened this issue 3 years ago • 3 comments

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:

  • This only happens when I install firefox in the Dockerfile. Installing other packages works fine!
  • The error doesn't occur on 20.04

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

System information

  • VSCode Version: 1.69.2
  • Local OS Version: Windows_NT x64 10.0.19043
  • Local chip architecture: x86_64
  • Reproduces in: Remote - Containers
  • Name of Dev Container Definition with Issue: Ubuntu

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

nasso avatar Jul 25 '22 18:07 nasso

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

  • VSCode Version: 1.69.2
  • Local OS Version: Ubuntu 22.04 LTS
  • Local chip architecture: x86_64
  • Reproduces in: Remote - Containers
  • Name of Dev Container Definition with Issue: Ubuntu

image

skyf0l avatar Jul 25 '22 19:07 skyf0l

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

joshspicer avatar Jul 28 '22 14:07 joshspicer

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

image image

joshspicer avatar Jul 28 '22 15:07 joshspicer