File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,18 +2,20 @@ FROM docker.io/myoung34/github-runner:latest
22
33USER root
44
5- # Install dependencies and Rust in one layer
5+ # Install system dependencies
66RUN apt-get update && apt-get install -y \
77 curl \
88 build-essential \
99 pkg-config \
1010 libssl-dev \
11- && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable \
12- && /root/.cargo/bin/rustup component add clippy rustfmt \
13- && /root/.cargo/bin/rustup target add x86_64-unknown-linux-musl \
1411 && apt-get clean \
1512 && rm -rf /var/lib/apt/lists/*
1613
17- # Add Rust to PATH for all users
18- ENV PATH="/root/.cargo/bin:${PATH}"
14+ # Switch to runner user and install Rust
15+ USER runner
16+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable \
17+ && /home/runner/.cargo/bin/rustup component add clippy rustfmt \
18+ && /home/runner/.cargo/bin/rustup target add x86_64-unknown-linux-musl
1919
20+ # Add Rust to PATH for runner user
21+ ENV PATH="/home/runner/.cargo/bin:${PATH}"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ podman build -t github-runner .
4+
Original file line number Diff line number Diff line change 1- version : ' 3 '
1+ version : " 3 "
22services :
33 worker :
44 image : ghcr.io/onmcu/dockerized-gha-runner:latest
@@ -9,11 +9,10 @@ services:
99 RUNNER_TOKEN : {{ GITHUB_RUNNER_TOKEN }}
1010 RUNNER_WORKDIR : /tmp/runner/work
1111 CONFIGURED_ACTIONS_RUNNER_FILES_DIR : /runner/data
12- RUNNER_SCOPE : ' repo'
1312 LABELS : linux,x64,gpu,rust
1413 DISABLE_AUTOMATIC_DEREGISTRATION : true
1514 volumes :
16- - ' ./data:/runner/data:Z'
17- - ' ./tmp:/tmp/runner:Z'
15+ - " ./data:/runner/data:Z"
16+ - " ./tmp:/tmp/runner:Z"
1817 security_opt :
1918 - label=disable
You can’t perform that action at this time.
0 commit comments