File tree Expand file tree Collapse file tree 4 files changed +8
-29
lines changed
projects/fhir_facade_api/.devcontainer Expand file tree Collapse file tree 4 files changed +8
-29
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ LABEL org.opencontainers.image.containerName=${CONTAINER_NAME}
2222LABEL org.opencontainers.image.authors="NHS England EPS Team"
2323LABEL org.opencontainers.image.base.image="mcr.microsoft.com/devcontainers/base:ubuntu-22.04"
2424
25-
26-
2725COPY .tool-versions.asdf ${SCRIPTS_DIR}/${CONTAINER_NAME}/.tool-versions.asdf
2826COPY --chmod=755 scripts ${SCRIPTS_DIR}/${CONTAINER_NAME}
2927
@@ -40,10 +38,3 @@ RUN ./vscode_install.sh
4038
4139# Switch back to root to install the devcontainer CLI globally
4240USER root
43-
44- RUN cp -R /home/vscode/.asdf /home/githubrunner/ && \
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/ && \
48- cp -R /home/vscode/.local /home/githubrunner/ && \
49- chown -R githubrunner:githubrunner /home/githubrunner/
Original file line number Diff line number Diff line change @@ -67,9 +67,12 @@ mkdir -p /usr/share/secrets-scanner
6767chmod 755 /usr/share/secrets-scanner
6868curl -L https://raw.githubusercontent.com/NHSDigital/software-engineering-quality-framework/main/tools/nhsd-git-secrets/nhsd-rules-deny.txt -o /usr/share/secrets-scanner/nhsd-rules-deny.txt
6969
70- chown -R vscode:vscode /home/vscode
71- mkdir -p /work
70+ # fix user and group ids for vscode user to be 1001 so it can be used by github actions
71+ requested_uid=1001
72+ requested_gid=1001
73+ current_uid=" $( id -u vscode) "
74+ current_gid=" $( id -g vscode) "
75+ if [ " ${current_gid} " != " ${requested_gid} " ]; then groupmod -g " ${requested_gid} " vscode; fi
76+ if [ " ${current_uid} " != " ${requested_uid} " ]; then usermod -u " ${requested_uid} " -g " ${requested_gid} " vscode; fi
7277
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
78+ chown -R vscode:vscode /home/vscode
Original file line number Diff line number Diff line change @@ -35,16 +35,8 @@ USER vscode
3535WORKDIR ${SCRIPTS_DIR}/${CONTAINER_NAME}
3636COPY .tool-versions /tmp/.tool-versions
3737RUN cat /tmp/.tool-versions >> /home/vscode/.tool-versions
38- ENV PATH="/home/vscode/.asdf/shims/:$PATH"
3938
4039RUN ./vscode_install.sh
4140
4241# Switch back to root to install the devcontainer CLI globally
4342USER root
44-
45- RUN cp -R /home/vscode/.asdf /home/githubrunner/ && \
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/ && \
49- cp -R /home/vscode/.local /home/githubrunner/ && \
50- chown -R githubrunner:githubrunner /home/githubrunner/
Original file line number Diff line number Diff line change @@ -37,10 +37,3 @@ RUN ./vscode_install.sh
3737
3838# Switch back to root to install the devcontainer CLI globally
3939USER root
40-
41- RUN cp -R /home/vscode/.asdf /home/githubrunner/ && \
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/ && \
45- cp -R /home/vscode/.local /home/githubrunner/ && \
46- chown -R githubrunner:githubrunner /home/githubrunner/
You can’t perform that action at this time.
0 commit comments