11FROM ubuntu:20.04
22
3- COPY export-aarch-infos.sh /export-aarch-infos.sh
4- RUN chmod +x /export-aarch-infos.sh
5-
63ARG DEBIAN_FRONTEND=noninteractive
4+ ARG PACKAGES="libffi-dev libicu-dev build-essential libssl-dev ca-certificates jq sed grep git curl wget zip"
75
86ENV USERNAME="runner"
97ENV RUNNER_HOME="/home/${USERNAME}/runner"
10- ENV GH_WORKDIR="/home/${USERNAME}"
8+
9+ ENV GH_RUNNER_WORKDIR="/home/${USERNAME}"
10+ ENV GH_KANIKO_WORKDIR="/kaniko/workspace"
1111
1212# https://github.com/actions/runner/releases
1313ENV GH_RUNNER_VERSION=2.289.1
1414ENV GH_RUNNER_LABELS=ubuntu-20.04
1515
1616ENV AWESOME_CI_VERSION 0.11.1
1717
18+ # making nessecarry directories
19+ RUN mkdir /helper-scripts \
20+ && mkdir -p /kaniko/workspace
21+
22+ # Copy image helper scripts
23+ COPY ./helper-scripts/gh-entrypoint.sh /helper-scripts/gh-entrypoint.sh
24+ COPY ./helper-scripts/kaniko-wrapper.sh /helper-scripts/kaniko-wrapper.sh
25+ COPY ./helper-scripts/translate-aarch.sh /helper-scripts/translate-aarch.sh
26+
27+ RUN chmod -R 755 /helper-scripts
28+
1829# install packages along with jq so we can parse JSON
1930# add additional packages as necessary
20- ARG PACKAGES="libffi-dev libicu-dev build-essential libssl-dev ca-certificates jq sed grep git curl wget zip"
21-
2231RUN apt-get update \
2332 && apt-get install -y ${PACKAGES} \
2433 && rm -rf /var/lib/apt/lists/* \
2534 && apt-get clean
2635
2736# install awesoeme ci
28- RUN export ARCH=$(/export-aarch-infos .sh a-short) \
29- && curl -L -O https://github.com/eksrvb /awesome-ci/releases/download/${AWESOME_CI_VERSION}/awesome-ci_${AWESOME_CI_VERSION}_${ARCH} \
37+ RUN export ARCH=$(/helper-scripts/translate-aarch .sh a-short) \
38+ && curl -L -O https://github.com/fullstack-devops /awesome-ci/releases/download/${AWESOME_CI_VERSION}/awesome-ci_${AWESOME_CI_VERSION}_${ARCH} \
3039 && mv awesome-ci_${AWESOME_CI_VERSION}_${ARCH} /usr/local/src/awesome-ci_${AWESOME_CI_VERSION}_${ARCH} \
3140 && chmod +x /usr/local/src/awesome-ci_${AWESOME_CI_VERSION}_${ARCH} \
3241 && ln -s /usr/local/src/awesome-ci_${AWESOME_CI_VERSION}_${ARCH} /usr/local/bin/
@@ -40,23 +49,17 @@ RUN useradd -m $USERNAME \
4049 && mkdir -p ${RUNNER_HOME}
4150
4251# Install github runner
43- RUN export ARCH=$(/export-aarch-infos .sh x-short) \
52+ RUN export ARCH=$(/helper-scripts/translate-aarch .sh x-short) \
4453 && curl -L -O https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION}/actions-runner-linux-${ARCH}-${GH_RUNNER_VERSION}.tar.gz \
4554 && tar -zxf actions-runner-linux-x64-${GH_RUNNER_VERSION}.tar.gz \
4655 && rm -f actions-runner-linux-x64-${GH_RUNNER_VERSION}.tar.gz \
4756 && ./bin/installdependencies.sh \
4857 && cd ./bin \
4958 && apt-get clean
5059
51- # copy over the start script
52- COPY gh-entrypoint.sh /gh-entrypoint.sh
53- # make the script executable
54- RUN chmod +x /gh-entrypoint.sh
55-
5660RUN chown -R $USERNAME /home/${USERNAME}
57- RUN chown -R $USERNAME /gh-entrypoint.sh
5861
5962# set the entrypoint to the entrypoint.sh script
60- ENTRYPOINT ["/gh-entrypoint.sh" ]
63+ ENTRYPOINT ["/helper-scripts/ gh-entrypoint.sh" ]
6164
6265USER $USERNAME
0 commit comments