Skip to content

Commit

Permalink
fix - adjust docker permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
chaddyc committed Dec 31, 2024
1 parent b3e5a38 commit e236eeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ RUN LATEST_RUNNER_VERSION=$(curl -s https://api.github.com/repos/actions/runner/
RUN ./bin/installdependencies.sh

RUN useradd -m -s /bin/bash runner && \
echo "runner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
echo "runner ALL=(ALL) NOPASSWD: /usr/bin/docker" >> /etc/sudoers

echo "runner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# RUN usermod -aG docker runner

RUN chown -R root:root /runner
RUN chown -R runner:runner /runner

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
2 changes: 2 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ fi
# echo "Warning: Docker socket not found. Ensure it is mounted at runtime."
# fi

sudo usermod -aG docker runner

# Configure the GitHub Actions runner
if [ ! -f .runner ]; then
./config.sh --url "${GITHUB_URL}" --token "${RUNNER_TOKEN}" --name "${RUNNER_NAME}" --unattended --replace
Expand Down

0 comments on commit e236eeb

Please sign in to comment.