-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (16 loc) · 776 Bytes
/
Dockerfile
File metadata and controls
19 lines (16 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ARG BASE_IMAGE_NAME=base
ARG BASE_IMAGE_TAG=latest
FROM ghcr.io/nhsdigital/eps-devcontainers/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}
# changes needed so that it can be used by github actions
## change vscode user and group id to be 1001
## change and move vscode home dir to be /github/home
RUN requested_uid=1001 \
&& requested_gid=1001 \
&& current_uid="$(id -u vscode)" \
&& current_gid="$(id -g vscode)" \
&& if [ "${current_gid}" != "${requested_gid}" ]; then groupmod -g "${requested_gid}" vscode; fi \
&& if [ "${current_uid}" != "${requested_uid}" ]; then usermod -u "${requested_uid}" -g "${requested_gid}" vscode; fi
USER vscode
ENV PATH="/home/vscode/.asdf/shims/:/home/vscode/.guard/bin/:$PATH:/vscode_path_mod"
ENV ASDF_DATA_DIR=/home/vscode/.asdf
USER root