File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 8787 BASE_VERSION : ${{ inputs.docker_tag}}
8888 IMAGE_TAG : " :${{ inputs.docker_tag }}-${{ matrix.arch }}"
8989 BASE_FOLDER : " ${{ inputs.base_folder }}"
90+ VSCODE_UID : " 1001"
91+ VSCODE_GID : " 1001"
9092 - name : Check docker vulnerabilities - json output
9193 uses : aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284
9294 with :
Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ COPY .tool-versions.asdf ${SCRIPTS_DIR}/${CONTAINER_NAME}/.tool-versions.asdf
1717COPY --chmod=755 scripts ${SCRIPTS_DIR}/${CONTAINER_NAME}
1818WORKDIR ${SCRIPTS_DIR}/${CONTAINER_NAME}
1919RUN ./root_install.sh
20+ RUN requested_uid="${VSCODE_UID:-1000}" \
21+ && requested_gid="${VSCODE_GID:-1000}" \
22+ && current_uid="$(id -u vscode)" \
23+ && current_gid="$(id -g vscode)" \
24+ && if [ "${current_gid}" != "${requested_gid}" ]; then groupmod -g "${requested_gid}" vscode; fi \
25+ && if [ "${current_uid}" != "${requested_uid}" ]; then usermod -u "${requested_uid}" -g "${requested_gid}" vscode; fi \
26+ && chown -R vscode:vscode /home/vscode
2027
2128USER vscode
2229
Original file line number Diff line number Diff line change 66 "build" : {
77 "dockerfile" : " Dockerfile" ,
88 "args" : {
9- "CONTAINER_NAME" : " eps_devcontainer_base"
9+ "CONTAINER_NAME" : " eps_devcontainer_base" ,
10+ "VSCODE_UID" : " ${localEnv:VSCODE_UID}" ,
11+ "VSCODE_GID" : " ${localEnv:VSCODE_GID}"
1012 }
1113 },
1214 "runArgs" : [
You can’t perform that action at this time.
0 commit comments