File tree Expand file tree Collapse file tree 4 files changed +31
-12
lines changed
Expand file tree Collapse file tree 4 files changed +31
-12
lines changed Original file line number Diff line number Diff line change 11FROM ubuntu:latest AS build
22
3- RUN groupadd --gid 1000 developer \
4- && useradd --uid 1000 --gid developer --shell /bin/bash --create-home developer
3+ ARG USER_UID=900
4+ ARG USER_GID=$USER_UID
5+
6+ # Create the non-root user and grant NOPASSWD sudo
7+ RUN groupadd --gid $USER_GID developer
8+ RUN useradd --uid $USER_UID --gid $USER_GID --shell /bin/bash --create-home developer
9+
10+ # Install sudo first
11+ RUN apt-get update
12+ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sudo
13+
14+ # No Sudo Prompt - thanks Electron for this
15+ RUN echo 'developer ALL=NOPASSWD: ALL' >> /etc/sudoers.d/developer
16+ RUN echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
517
618ENV DEBIAN_FRONTEND=1
7- ENV PATH /usr/lib/ccache:$PATH
19+ ENV PATH= /usr/lib/ccache:$PATH
820
921COPY --chown=root:developer ./scripts/ /home/developer/scripts/
10- RUN /home/developer/scripts/install.sh && /home/developer/scripts/mkdir.sh && /home/developer/scripts/ccache.sh && /home/developer/scripts/clone.sh && /home/developer/scripts/build.sh && make install -C /home/developer/nodejs/node && /home/developer/scripts/ncu.sh
22+ RUN /home/developer/scripts/install.sh
23+ RUN /home/developer/scripts/mkdir.sh
24+ RUN /home/developer/scripts/ccache.sh
25+ RUN /home/developer/scripts/clone.sh
26+ RUN /home/developer/scripts/build.sh
27+ RUN make install -C /home/developer/nodejs/node
28+ RUN /home/developer/scripts/ncu.sh
1129
1230WORKDIR /home/developer/nodejs/node
Original file line number Diff line number Diff line change 11- [x] Switch to ` node:latest `
22- [x] Install ` node-core-utils `
3- - [x] Documentation
3+ - [x] Documentation
4+ - [ ] Split into multiple stages https://github.com/nodejs/devcontainer/pull/12#discussion_r2375074158
5+ - [ ] Reuse Dockerfile bits from https://github.com/nodejs/build/blob/main/ansible/roles/docker/templates
Original file line number Diff line number Diff line change @@ -8,13 +8,16 @@ package_list="
88 curl \
99 nano \
1010 python3 \
11- python-setuptools \
1211 python3-pip \
12+ python-is-python3 \
1313 ninja-build \
1414 g++ \
15- sudo \
15+ gcc \
16+ g++-12 \
17+ gcc-12 \
1618 make \
1719 git \
20+ pkg-config \
1821 locales \
1922 gpg \
2023 wget"
@@ -29,7 +32,3 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githu
2932gh_package_list=" gh"
3033apt-get update
3134DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $gh_package_list
32-
33- # No Sudo Prompt - thanks Electron for this
34- echo ' developer ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-developer
35- echo ' Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
Original file line number Diff line number Diff line change 22
33set -e # Exit with nonzero exit code if anything fails
44
5- npm install -g node-core- utils
5+ npm install -g @ node-core/ utils
66
77ncu-config set upstream upstream
88ncu-config set branch main
You can’t perform that action at this time.
0 commit comments