Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build in devcontainer #12156

Closed
fgreinacher opened this issue Oct 13, 2021 · 39 comments · Fixed by #12165 or #14652
Closed

Cannot build in devcontainer #12156

fgreinacher opened this issue Oct 13, 2021 · 39 comments · Fixed by #12165 or #14652
Assignees
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code

Comments

@fgreinacher
Copy link
Contributor

fgreinacher commented Oct 13, 2021

Describe the bug

When opening this repository in a devcontainer config, e.g. in GitHub Codespaces yarn install fails due to missing permissions for /tmp. To me it looks like /tmp has incorrect permissions for the non-root user:

image

Have you created a minimal reproduction repository?

No reproduction repository, but here are the steps:

  1. Create a new codespace for this repository: Screen Shot 2021-10-14 at 10 41 14
  2. Wait for the codespace to open.
  3. Switch to the Terminal panel and run yarn install: image
@fgreinacher fgreinacher added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Oct 13, 2021
@fgreinacher fgreinacher changed the title Cannot build in GitHub Codespaces Cannot build in devcontainer Oct 13, 2021
@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2021

Can you describe the exact steps to reproduce?

@HonkingGoose HonkingGoose added status:waiting-on-response and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Oct 14, 2021
@fgreinacher
Copy link
Contributor Author

Can you describe the exact steps to reproduce?

Sure, added repro steps to the description!

@viceice viceice removed the type:bug Bug fix of existing functionality label Oct 14, 2021
@viceice
Copy link
Member

viceice commented Oct 14, 2021

Removing bug label, as this isn't a renovate bug, it's just a developper issue 🙃

BTW: I see a bug, the v prefix for node versaion shouldn't be there 😕

@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2021

Reproduced, I think:

user@codespaces_0f8274:/workspaces/renovate$ yarn
yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "eslint-config-airbnb-typescript > eslint-config-airbnb@18.2.1" has unmet peer dependency "eslint-plugin-jsx-a11y@^6.4.1".
warning "eslint-config-airbnb-typescript > eslint-config-airbnb@18.2.1" has unmet peer dependency "eslint-plugin-react@^7.21.5".
warning "eslint-config-airbnb-typescript > eslint-config-airbnb@18.2.1" has unmet peer dependency "eslint-plugin-react-hooks@^4 || ^3 || ^2.3.0 || ^1.7.0".
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
⠁ 
⠁ 
⠁ 
warning Error running install script for optional dependency: "/workspaces/renovate/node_modules/dtrace-provider: EACCES: permission denied, mkdir '/tmp/yarn--1634201606305-0.5943433528827595'"
info This module is OPTIONAL, you can safely ignore this error



warning Error running install script for optional dependency: "/workspaces/renovate/node_modules/re2: EACCES: permission denied, mkdir '/tmp/yarn--1634201606309-0.0522022552869823'"
info This module is OPTIONAL, you can safely ignore this error
user@codespaces_0f8274:/workspaces/renovate$ 

@viceice
Copy link
Member

viceice commented Oct 14, 2021

Strange, we never change permissions on /tmp 🤔

@HonkingGoose HonkingGoose added status:requirements Full requirements are not yet known, so implementation should not be started type:refactor Refactoring or improving of existing code and removed status:waiting-on-response labels Oct 14, 2021
@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2021

user@codespaces_0f8274:/workspaces/renovate$ ls -l /
total 68
lrwxrwxrwx    1 root root    7 Sep 21 16:48 bin -> usr/bin
drwxr-xr-x    2 root root 4096 Apr 15  2020 boot
drwxr-xr-x    5 root root  340 Oct 14 08:51 dev
drwxr-xr-x    1 root root 4096 Oct 14 08:51 etc
drwxr-xr-x    1 root root 4096 Oct  1 05:22 home
lrwxrwxrwx    1 root root    7 Sep 21 16:48 lib -> usr/lib
lrwxrwxrwx    1 root root    9 Sep 21 16:48 lib32 -> usr/lib32
lrwxrwxrwx    1 root root    9 Sep 21 16:48 lib64 -> usr/lib64
lrwxrwxrwx    1 root root   10 Sep 21 16:48 libx32 -> usr/libx32
drwxr-xr-x    2 root root 4096 Sep 21 16:48 media
drwxr-xr-x    2 root root 4096 Sep 21 16:48 mnt
drwxr-xr-x    2 root root 4096 Sep 21 16:48 opt
dr-xr-xr-x  236 root root    0 Oct 14 08:51 proc
drwx------    1 root root 4096 Oct 12 19:45 root
drwxr-xr-x    5 root root 4096 Sep 21 17:00 run
lrwxrwxrwx    1 root root    8 Sep 21 16:48 sbin -> usr/sbin
drwxr-xr-x    2 root root 4096 Sep 21 16:48 srv
dr-xr-xr-x   12 root root    0 Oct 14 04:26 sys
drwxr-xrwt+   2 root root 4096 Oct 14 08:49 tmp
drwxr-xr-x    1 root root 4096 Oct  1 05:22 usr
drwxr-xr-x    1 root root 4096 Oct 14 08:51 var
drwxr-xr-x    5 root root 4096 Oct 14 04:28 vscode
drwxr-xrwx+   4 user root 4096 Oct 14 08:50 workspaces

@viceice
Copy link
Member

viceice commented Oct 14, 2021

maybe we need a new WORKDIR docker directive?

@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2021

Vanilla buildpack works:

❯ docker run --rm -it containerbase/node:v14.18.1@sha256:b720748f7a35570e402a8741f37a5bd54ad485dd6b4aeaff04027ad761b1306d /bin/bash
user@a2a50855ac9d:/$ mkdir '/tmp/yarn--1634201606305-0.5943433528827595'
user@a2a50855ac9d:/$

codespaces does not:

user@codespaces_0f8274:~$ mkdir '/tmp/yarn--1634201606305-0.5943433528827595'
mkdir: cannot create directory ‘/tmp/yarn--1634201606305-0.5943433528827595’: Permission denied

@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2021

Shall we try #12165 ?

@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2021

Reopening, because I restated my codespaces and still get this:

user@codespaces_fcf2a4:/workspaces/renovate$ yarn
yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "eslint-config-airbnb-typescript > eslint-config-airbnb@18.2.1" has unmet peer dependency "eslint-plugin-jsx-a11y@^6.4.1".
warning "eslint-config-airbnb-typescript > eslint-config-airbnb@18.2.1" has unmet peer dependency "eslint-plugin-react@^7.21.5".
warning "eslint-config-airbnb-typescript > eslint-config-airbnb@18.2.1" has unmet peer dependency "eslint-plugin-react-hooks@^4 || ^3 || ^2.3.0 || ^1.7.0".
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
⠁ 
⠁ 
⠁ 
warning Error running install script for optional dependency: "/workspaces/renovate/node_modules/dtrace-provider: EACCES: permission denied, mkdir '/tmp/yarn--1634213552020-0.11372496331198811'"
info This module is OPTIONAL, you can safely ignore this error



warning Error running install script for optional dependency: "/workspaces/renovate/node_modules/re2: EACCES: permission denied, mkdir '/tmp/yarn--1634213552023-0.38577642388870537'"
info This module is OPTIONAL, you can safely ignore this error
user@codespaces_fcf2a4:/workspaces/renovate$ 

@rarkins rarkins reopened this Oct 14, 2021
@rarkins
Copy link
Collaborator

rarkins commented Oct 14, 2021

This seems to be a workaround:

user@codespaces_fcf2a4:/workspaces/renovate$ mkdir /workspaces/tmp
user@codespaces_fcf2a4:/workspaces/renovate$ export TMPDIR=/workspaces/tmp

On a related note, I always see this:
image

And clicking in EITHER button is a bad idea:

  • Retry restarts my codespaces and returns me to Renovate, but doesn't fix it
  • Exit restarts my codespaces and leaves me with no repo

@JamieMagee can you be our hero here? :)

@renovatebot renovatebot deleted a comment from renovate-release Oct 14, 2021
@JamieMagee
Copy link
Contributor

Sure, I can take a look.

We probably need to set a non-root user for the devcontainer.

@viceice
Copy link
Member

viceice commented Oct 14, 2021

Sure, I can take a look.

We probably need to set a non-root user for the devcontainer.

We are a non root user user (1000).

https://github.com/containerbase/node/blob/d503889b23bb740306ef700454321a7a871014e2/Dockerfile#L12

@JamieMagee
Copy link
Contributor

True, but there's a couple of relateddevcontainer.json settings https://code.visualstudio.com/docs/remote/devcontainerjson-reference

image

It does say it reads the last USER command from the Dockerfile but... 🤷

@fgreinacher
Copy link
Contributor Author

fgreinacher commented Oct 15, 2021

Permissions for /tmp are the same, but the yarn-- directories are owned by node instead of root:

image

$TMPDIR is not set:

image

@fgreinacher
Copy link
Contributor Author

Output from docker history:

IMAGE                                                                     CREATED       CREATED BY                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   SIZE      COMMENT
sha256:39cb366258d73d69bc18b3b30f3569db85b43a3266f73bb0fd60e2dd57ff9d9b   6 weeks ago   RUN |1 NODE_MODULES=tslint-to-eslint-config typescript /bin/sh -c su node -c "umask 0002 && npm install -g ${NODE_MODULES}"     && npm cache clean --force > /dev/null 2>&1 # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       169MB     buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   COPY library-scripts/meta.env /usr/local/etc/vscode-dev-containers # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                344B      buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ARG NODE_MODULES=tslint-to-eslint-config typescript                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   RUN |6 INSTALL_ZSH=true UPGRADE_PACKAGES=true USERNAME=node USER_UID=1000 USER_GID=1000 NPM_GLOBAL=/usr/local/share/npm-global /bin/sh -c apt-get update && export DEBIAN_FRONTEND=noninteractive     && apt-get purge -y imagemagick imagemagick-6-common     && bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true"     && rm -rf /opt/yarn-* /usr/local/bin/yarn /usr/local/bin/yarnpkg     && bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "none" "${USERNAME}"     && if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi     && usermod -a -G npm ${USERNAME}     && umask 0002     && mkdir -p ${NPM_GLOBAL}     && touch /usr/local/etc/npmrc     && chown ${USERNAME}:npm ${NPM_GLOBAL} /usr/local/etc/npmrc     && chmod g+s ${NPM_GLOBAL}     && npm config -g set prefix ${NPM_GLOBAL}     && sudo -u ${USERNAME} npm config -g set prefix ${NPM_GLOBAL}     && su ${USERNAME} -c "umask 0002 && npm install -g eslint"     && npm cache clean --force > /dev/null 2>&1     && . /etc/os-release     && if [ "${VERSION_CODENAME}" = "bullseye" ]; then apt-get -y install --no-install-recommends python-is-python3; fi     && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /root/.gnupg /tmp/library-scripts # buildkit                                                                                                                                                                                                                                                                                                131MB     buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   COPY library-scripts/*.sh library-scripts/*.env /tmp/library-scripts/ # buildkit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             24.7kB    buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ENV NVM_SYMLINK_CURRENT=true PATH=/usr/local/share/npm-global/bin:/usr/local/share/nvm/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ENV NVM_DIR=/usr/local/share/nvm                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ARG NPM_GLOBAL=/usr/local/share/npm-global                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ARG USER_GID=1000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ARG USER_UID=1000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ARG USERNAME=node                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ARG UPGRADE_PACKAGES=true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    0B        buildkit.dockerfile.v0
<missing>                                                                 6 weeks ago   ARG INSTALL_ZSH=true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         0B        buildkit.dockerfile.v0
<missing>                                                                 7 weeks ago   /bin/sh -c #(nop)  CMD ["node"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0B        
<missing>                                                                 7 weeks ago   /bin/sh -c #(nop)  ENTRYPOINT ["docker-entrypoint.sh"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       0B        
<missing>                                                                 7 weeks ago   /bin/sh -c #(nop) COPY file:238737301d47304174e4d24f4def935b29b3069c03c72ae8de97d94624382fce in /usr/local/bin/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              116B      
<missing>                                                                 7 weeks ago   /bin/sh -c set -ex   && for key in     6A010C5166006599AA17F08146C2130DFD2497F5   ; do     gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" ||     gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ;   done   && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz"   && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc"   && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz   && mkdir -p /opt   && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/   && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn   && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg   && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz   && yarn --version                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       7.58MB    
<missing>                                                                 7 weeks ago   /bin/sh -c #(nop)  ENV YARN_VERSION=1.22.5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0B        
<missing>                                                                 7 weeks ago   /bin/sh -c ARCH= && dpkgArch="$(dpkg --print-architecture)"   && case "${dpkgArch##*-}" in     amd64) ARCH='x64';;     ppc64el) ARCH='ppc64le';;     s390x) ARCH='s390x';;     arm64) ARCH='arm64';;     armhf) ARCH='armv7l';;     i386) ARCH='x86';;     *) echo "unsupported architecture"; exit 1 ;;   esac   && set -ex   && for key in     4ED778F539E3634C779C87C6D7062848A1AB005C     94AE36675C464D64BAFA68DD7434390BDBE9B9C5     74F12602B6F1C4E913FAA37AD3A89613643B6201     71DCFD284A79C3B38668286BC97EC7A07EDE3FC1     8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600     C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8     C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C     DD8F2338BAE7501E3DD5AC78C273792F7D83545D     A48C2BEE680E841632CD4E44F07496B3EB3C1762     108F52B48DB57BB0CC439B2997B01419BD92F80A     B9E2F5981AA6E0CD28160D9FF13993A75599653C   ; do       gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" ||       gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ;   done   && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz"   && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc"   && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc   && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c -   && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner   && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt   && ln -s /usr/local/bin/node /usr/local/bin/nodejs   && node --version   && npm --version   95.3MB    
<missing>                                                                 7 weeks ago   /bin/sh -c #(nop)  ENV NODE_VERSION=16.8.0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   0B        
<missing>                                                                 8 weeks ago   /bin/sh -c groupadd --gid 1000 node   && useradd --uid 1000 --gid node --shell /bin/bash --create-home node                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  334kB     
<missing>                                                                 8 weeks ago   /bin/sh -c set -ex;  apt-get update;  apt-get install -y --no-install-recommends   autoconf   automake   bzip2   dpkg-dev   file   g++   gcc   imagemagick   libbz2-dev   libc6-dev   libcurl4-openssl-dev   libdb-dev   libevent-dev   libffi-dev   libgdbm-dev   libglib2.0-dev   libgmp-dev   libjpeg-dev   libkrb5-dev   liblzma-dev   libmagickcore-dev   libmagickwand-dev   libmaxminddb-dev   libncurses5-dev   libncursesw5-dev   libpng-dev   libpq-dev   libreadline-dev   libsqlite3-dev   libssl-dev   libtool   libwebp-dev   libxml2-dev   libxslt-dev   libyaml-dev   make   patch   unzip   xz-utils   zlib1g-dev     $(    if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then     echo 'default-libmysqlclient-dev';    else     echo 'libmysqlclient-dev';    fi   )  ;  rm -rf /var/lib/apt/lists/*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  528MB     
<missing>                                                                 8 weeks ago   /bin/sh -c apt-get update && apt-get install -y --no-install-recommends   git   mercurial   openssh-client   subversion     procps  && rm -rf /var/lib/apt/lists/*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           152MB     
<missing>                                                                 8 weeks ago   /bin/sh -c set -ex;  if ! command -v gpg > /dev/null; then   apt-get update;   apt-get install -y --no-install-recommends    gnupg    dirmngr   ;   rm -rf /var/lib/apt/lists/*;  fi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         18.9MB    
<missing>                                                                 8 weeks ago   /bin/sh -c set -eux;  apt-get update;  apt-get install -y --no-install-recommends   ca-certificates   curl   netbase   wget  ;  rm -rf /var/lib/apt/lists/*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  10.7MB    
<missing>                                                                 8 weeks ago   /bin/sh -c #(nop)  CMD ["bash"]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              0B        
<missing>                                                                 8 weeks ago   /bin/sh -c #(nop) ADD file:a528c112b566e7f129178dadedfa421b0c5b870997c4628327967850e54b915c in /                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             124MB     

@fgreinacher
Copy link
Contributor Author

fgreinacher commented Oct 15, 2021

One difference I noticed: The user In the containerbase/node image has gid 0, the user in the default image gid 1000.

There is so much more going on in the default image that I'm wondering why not just switch (back) to it?

@viceice
Copy link
Member

viceice commented Oct 18, 2021

so the problem seems to be the root group permissions on tmp 😕 We need this for openstack compabillity.

@HonkingGoose HonkingGoose added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others and removed priority-5-triage labels Oct 18, 2021
@rarkins
Copy link
Collaborator

rarkins commented Oct 18, 2021

@viceice can you elaborate? What do we set them to and does codespaces change it? Can we alternatively create our own tmp to use instead, Eg /usr/src/tmp ? (Note: lots of our docs may need to change..)

@fgreinacher
Copy link
Contributor Author

@viceice @rarkins Can I do anything to bring this forward? I'd really like to have devcontainer support back 😀

@rarkins
Copy link
Collaborator

rarkins commented Nov 6, 2021

I'm ok with using one of the default containers if we can't get our own working yet

@viceice
Copy link
Member

viceice commented Nov 6, 2021

Let me try to fix it tomorrow.

@viceice
Copy link
Member

viceice commented Dec 16, 2021

@viceice viceice added status:in-progress Someone is working on implementation and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Dec 16, 2021
@fgreinacher
Copy link
Contributor Author

fgreinacher commented Dec 17, 2021

This should fix the issue

Works like a charm, thanks for taking care @viceice! I was too quick with this, error still seems to be there.

While yarn install does not fail, very similar messages still show up as warnings, and a subsequent yarn test fails with permission errors.

image

@JamieMagee
Copy link
Contributor

JamieMagee commented Jan 5, 2022

Shall we switch back to the standard image? mcr.microsoft.com/vscode/devcontainers/typescript-node:14 or one of the other tags1

Footnotes

  1. https://mcr.microsoft.com/v2/vscode/devcontainers/typescript-node/tags/list

@fgreinacher
Copy link
Contributor Author

fgreinacher commented Jan 11, 2022

Shall we switch back to the standard image? mcr.microsoft.com/vscode/devcontainers/typescript-node:14 or one of the other tags1

I've used that as a workaround in the past. @rarkins @viceice Should I send a PR or do you want to try something else?

@viceice
Copy link
Member

viceice commented Jan 11, 2022

No, i think I'll try to find a fix

@fgreinacher
Copy link
Contributor Author

@viceice Sorry to ping you here all the time but this really bugs me every time I want to do a smaller contribution. What do you think about moving to the standard image suggested by @JamieMagee until the issue in containerbase/node is fixed?

@viceice
Copy link
Member

viceice commented Mar 14, 2022

ok, will look at it now

@viceice
Copy link
Member

viceice commented Mar 14, 2022

Getting a different error on windows 😕
image

edit: local renovate folder is mounted as root. So we maybe need to run the container as root too?

@viceice
Copy link
Member

viceice commented Mar 14, 2022

🤔 Running from wsl filesystem in container works for me.

image

@viceice
Copy link
Member

viceice commented Mar 15, 2022

So my summary is, because our user is a member of root group we dont have access to /tmp somehow, at least on codespaces

drwxr-xrwt+   2 root root 4096 Oct 14 08:49 tmp

That why we switch to root user for now until we find a better solution. see #14652

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 32.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code
Projects
None yet
6 participants