Skip to content

Commit df3bcc5

Browse files
committed
Add docker and sudo
1 parent c58535b commit df3bcc5

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

Dockerfile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
FROM ubuntu:latest
22
RUN apt-get update && \
3-
apt-get install -y curl tar docker && \
3+
apt-get install -y \
4+
curl \
5+
tar \
6+
apt-transport-https \
7+
ca-certificates \
8+
curl \
9+
sudo \
10+
gnupg-agent \
11+
software-properties-common
12+
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
13+
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
14+
RUN apt-get install -y docker-ce && \
415
rm -rf /var/lib/apt/lists/*
16+
517
RUN mkdir actions-runner && cd actions-runner
618
RUN curl -O https://githubassets.azureedge.net/runners/2.160.2/actions-runner-linux-x64-2.160.2.tar.gz
719
RUN tar xzf ./actions-runner-linux-x64-2.160.2.tar.gz
20+
RUN mkdir /_work
21+
WORKDIR /_work
822
COPY entrypoint.sh /
923
RUN chmod +x /entrypoint.sh
1024
ENTRYPOINT ["/entrypoint.sh"]

entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
export AGENT_ALLOW_RUNASROOT=1
3-
echo ${RUNNER_NAME:-default}$'\n\n' | ./config.sh --url ${REPO_URL} --token ${RUNNER_TOKEN}
4-
exec ./run.sh
3+
echo ${RUNNER_NAME:-default}$'\n\n' | /config.sh --url ${REPO_URL} --token ${RUNNER_TOKEN}
4+
exec /run.sh

0 commit comments

Comments
 (0)