File tree Expand file tree Collapse file tree 2 files changed +31
-11
lines changed
Expand file tree Collapse file tree 2 files changed +31
-11
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,27 @@ runs:
1717 TAG=runtimeverificationinc/${CONTAINER_NAME}
1818 K_COMMIT=$(grep -Po '[0-9.]+' ./deps/k_release)
1919
20- docker build . --tag ${TAG} --build-arg K_COMMIT=${K_COMMIT} --file .github/workflows/Dockerfile
20+ USER=github-user
21+ GROUP=${USER}
22+ USER_ID=1000
23+ GROUP_ID=${USER_ID}
2124
22- docker run \
23- --name ${CONTAINER_NAME} \
24- --rm \
25- --interactive \
26- --tty \
27- --detach \
28- -v ${PWD}:${PWD} \
29- --workdir ${PWD} \
25+ docker build . --tag ${TAG} \
26+ --file .github/workflows/Dockerfile \
27+ --build-arg K_COMMIT=${K_COMMIT} \
28+ --build-arg USER=${USER} \
29+ --build-arg GROUP=${GROUP} \
30+ --build-arg USER_ID=${USER_ID} \
31+ --build-arg GROUP_ID=${GROUP_ID}
32+
33+ docker run \
34+ --name ${CONTAINER_NAME} \
35+ --rm \
36+ --interactive \
37+ --tty \
38+ --detach \
39+ --workdir /home/${USER}/workspace \
3040 ${TAG}
41+
42+ docker cp . ${CONTAINER_NAME}:/home/${USER}/workspace
43+ docker exec ${CONTAINER_NAME} chown -R ${USER}:${GROUP} /home/${USER}
Original file line number Diff line number Diff line change @@ -5,9 +5,16 @@ RUN apt-get update \
55 && apt-get upgrade --yes \
66 && apt-get install --yes \
77 curl
8+
9+ ARG USER=user
10+ ARG GROUP
811ARG USER_ID=1000
912ARG GROUP_ID=1000
10- RUN groupadd -g $GROUP_ID user && useradd -m -u $USER_ID -s /bin/sh -g user user
11- USER user:user
13+ RUN groupadd -g ${GROUP_ID} ${GROUP} && useradd -m -u ${USER_ID} -s /bin/sh -g ${GROUP} ${USER}
14+ USER ${USER}:${GROUP}
15+
16+ RUN mkdir /home/${USER}/workspace
17+ WORKDIR /home/${USER}/workspace
18+
1219ENV PATH=/home/user/.local/bin:${PATH}
1320RUN curl -LsSf https://astral.sh/uv/install.sh | sh && uv --version
You can’t perform that action at this time.
0 commit comments