coder / sail

Deprecated: Instant, pre-configured VS Code development environments.
https://sail.dev
MIT License
629 stars 36 forks source link

Documentation's "apt-get" fails as the user is not root #252

Open tennox opened 4 years ago

tennox commented 4 years ago

I copied from the documentation:

FROM codercom/ubuntu-dev-node12:latest
RUN apt-get update && apt-get install -y \
        bsdtar \
    && rm -rf /var/lib/apt/lists/*

But the command fails:

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/

Doing the same with sudo works:

FROM codercom/ubuntu-dev-node12:latest
RUN sudo apt-get update && sudo apt-get install -y \
        bsdtar \
    && sudo rm -rf /var/lib/apt/lists/*

Sail version: v1.1.0 Code-Server version: 2.1692-vsc1.39.2 e14362f3224c101585a26bf7ee5fa6e3bf425046 x64 Docker image version: 587ef9bdcb39f9edec99034726cd379683646de7f089896257dee97c4f0a0894