-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7a190b
commit 1f54bac
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ARG K_VERSION | ||
FROM runtimeverificationinc/kframework-k:ubuntu-jammy-${K_VERSION} | ||
|
||
ARG PYTHON_VERSION=3.10 | ||
|
||
RUN apt-get -y update \ | ||
&& apt-get -y install \ | ||
graphviz \ | ||
python${PYTHON_VERSION} \ | ||
python${PYTHON_VERSION}-dev \ | ||
&& apt-get -y clean | ||
|
||
ARG USER_ID=9876 | ||
ARG GROUP_ID=9876 | ||
RUN groupadd -g ${GROUP_ID} user \ | ||
&& useradd -m -u ${USER_ID} -s /bin/bash -g user user | ||
|
||
USER user | ||
WORKDIR /home/user | ||
|
||
ENV PATH=/home/user/.local/bin:${PATH} | ||
RUN curl -sSL https://install.python-poetry.org | python3 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'With Docker' | ||
description: 'Run a given stage with Docker Image' | ||
inputs: | ||
container-name: | ||
description: 'Docker container name to use' | ||
type: string | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Set up Docker' | ||
shell: bash {0} | ||
run: | | ||
set -euxo pipefail | ||
CONTAINER_NAME=${{ inputs.container-name }} | ||
TAG=runtimeverificationinc/${CONTAINER_NAME} | ||
K_VERSION=$(cat deps/k_release) | ||
docker build . \ | ||
--file .github/actions/with-docker/Dockerfile \ | ||
--tag ${TAG} \ | ||
--build-arg K_VERSION=${K_VERSION} | ||
docker run \ | ||
--name ${CONTAINER_NAME} \ | ||
--rm \ | ||
--interactive \ | ||
--tty \ | ||
--detach \ | ||
--user root \ | ||
--workdir /home/user \ | ||
${TAG} | ||
docker cp . ${CONTAINER_NAME}:/home/user | ||
docker exec ${CONTAINER_NAME} chown -R user:user /home/user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters