sail icon indicating copy to clipboard operation
sail copied to clipboard

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

Open tennox opened this issue 4 years ago • 0 comments

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

tennox avatar Nov 29 '19 11:11 tennox