Skip to content

Commit 884605a

Browse files
committed
fix path
1 parent fa1b29f commit 884605a

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ CONTAINER_NAME=fhir_facade_api \
222222
IMAGE_TAG=local-build \
223223
make shell-image
224224
```
225+
github actions image
226+
```
227+
CONTAINER_NAME=base \
228+
IMAGE_TAG=githubactions-local-build \
229+
make shell-image
230+
```
225231

226232
## Using local or pull request images in visual studio code
227233
You can use local or pull request images by changing IMAGE_VERSION in devcontainer.json.

src/githubactions/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@ ARG BASE_IMAGE_NAME=base
22
ARG BASE_IMAGE_TAG=latest
33
FROM ghcr.io/nhsdigital/eps-devcontainers/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}
44

5+
# changes needed so that it can be used by github actions
6+
## change vscode user and group id to be 1001
7+
## change and move vscode home dir to be /github/home
8+
59
RUN requested_uid=1001 \
610
&& requested_gid=1001 \
711
&& current_uid="$(id -u vscode)" \
812
&& current_gid="$(id -g vscode)" \
913
&& if [ "${current_gid}" != "${requested_gid}" ]; then groupmod -g "${requested_gid}" vscode; fi \
1014
&& if [ "${current_uid}" != "${requested_uid}" ]; then usermod -u "${requested_uid}" -g "${requested_gid}" vscode; fi \
11-
&& chown -R vscode:vscode /home/vscode
15+
&& mkdir -p /github \
16+
&& usermod -d /github/home -m vscode \
17+
&& chown -R vscode:vscode /github/home
18+
19+
ENV PATH="/github/home/.asdf/shims/:/github/home/.guard/bin/:$PATH:/root_path_mod"
20+
USER vscode
21+
ENV PATH="/github/home/.asdf/shims/:/github/home/.guard/bin/:$PATH:/vscode_path_mod"
22+
USER root

0 commit comments

Comments
 (0)