Skip to content

Commit c2726ad

Browse files
committed
add user 1001
1 parent 37cee2e commit c2726ad

4 files changed

Lines changed: 25 additions & 2 deletions

File tree

src/base/.devcontainer/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@ RUN ./vscode_install.sh
4040

4141
# Switch back to root to install the devcontainer CLI globally
4242
USER root
43+
44+
RUN cp -R /home/vscode/.asdf /home/githubrunner/.asdf && \
45+
cp /home/vscode/.tool-versions.asdf /home/githubrunner/.tool-versions.asdf && \
46+
cp /home/vscode/.tool-versions /home/githubrunner/.tool-versions && \
47+
cp -R /home/vscode/.config /home/githubrunner/.config && \
48+
cp -R /home/vscode/.local /home/githubrunner/.local && \
49+
chown -R githubrunner:githubrunner /home/githubrunner/

src/base/.devcontainer/scripts/root_install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,7 @@ curl -L https://raw.githubusercontent.com/NHSDigital/software-engineering-qualit
6969

7070
chown -R vscode:vscode /home/vscode
7171
mkdir -p /work
72-
chown -R vscode:vscode /work
73-
chmod -R 777 /work
72+
73+
addgroup githubrunner -gid 1001
74+
adduser githubrunner -uid 1001 -gid 1001 --shell /bin/bash --disabled-password -c "Githubrunner user"
75+
echo "githubrunner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

src/common/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@ RUN ./vscode_install.sh
4141

4242
# Switch back to root to install the devcontainer CLI globally
4343
USER root
44+
45+
RUN cp -R /home/vscode/.asdf /home/githubrunner/.asdf && \
46+
cp /home/vscode/.tool-versions.asdf /home/githubrunner/.tool-versions.asdf && \
47+
cp /home/vscode/.tool-versions /home/githubrunner/.tool-versions && \
48+
cp -R /home/vscode/.config /home/githubrunner/.config && \
49+
cp -R /home/vscode/.local /home/githubrunner/.local && \
50+
chown -R githubrunner:githubrunner /home/githubrunner/

src/projects/fhir_facade_api/.devcontainer/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ RUN ./vscode_install.sh
3737

3838
# Switch back to root to install the devcontainer CLI globally
3939
USER root
40+
41+
RUN cp -R /home/vscode/.asdf /home/githubrunner/.asdf && \
42+
cp /home/vscode/.tool-versions.asdf /home/githubrunner/.tool-versions.asdf && \
43+
cp /home/vscode/.tool-versions /home/githubrunner/.tool-versions && \
44+
cp -R /home/vscode/.config /home/githubrunner/.config && \
45+
cp -R /home/vscode/.local /home/githubrunner/.local && \
46+
chown -R githubrunner:githubrunner /home/githubrunner/

0 commit comments

Comments
 (0)