|
| 1 | +FROM ghcr.io/fullstack-devops/github-actions-runner:latest-base |
| 2 | + |
| 3 | +USER root |
| 4 | +# install packages along with jq so we can parse JSON |
| 5 | +# add additional packages as necessary |
| 6 | +ARG PACKAGES="nodejs ansible chromium python3-selenium xvfb" |
| 7 | +ARG PACKAGES_PYTHON="kubernetes" |
| 8 | + |
| 9 | +## ansible keys |
| 10 | +RUN wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add - |
| 11 | +RUN echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list |
| 12 | + |
| 13 | +## helper for karma and chromium |
| 14 | +ENV CHROME_BIN="/usr/bin/chromium" |
| 15 | +ADD xvfb-chromium /usr/bin/xvfb-chromium |
| 16 | +ADD xvfb-chromium-webgl /usr/bin/xvfb-chromium-webgl |
| 17 | +ADD display-chromium /usr/bin/display-chromium |
| 18 | + |
| 19 | +RUN chmod +x /usr/bin/display-chromium /usr/bin/xvfb-chromium-webgl /usr/bin/xvfb-chromium |
| 20 | + |
| 21 | +RUN apt-get update \ |
| 22 | + && add-apt-repository -y --update ppa:ansible/ansible \ |
| 23 | + && add-apt-repository -y --update ppa:xtradeb/apps \ |
| 24 | + && curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ |
| 25 | + && apt-get install -y --no-install-recommends ${PACKAGES} \ |
| 26 | + && rm -rf /var/lib/apt/lists/* \ |
| 27 | + && apt-get clean |
| 28 | + |
| 29 | +ENV GH_RUNNER_LABELS="ubuntu-20.04,nodejs,yarn,karma,chrome,helm,ansible" |
| 30 | +# https://github.com/helm/helm/releases |
| 31 | +ARG HELM_VERSION=3.8.1 |
| 32 | +# https://go.dev/dl/ |
| 33 | +ARG GO_VERSION=1.18 |
| 34 | + |
| 35 | +# Install helm |
| 36 | +RUN export ARCH=$(/helper-scripts/translate-aarch.sh a-short) \ |
| 37 | + && wget -q https://get.helm.sh/helm-v${HELM_VERSION}-linux-${ARCH}.tar.gz -O - | tar -xzO linux-${ARCH}/helm > /usr/local/bin/helm \ |
| 38 | + && chmod +x /usr/local/bin/helm |
| 39 | + |
| 40 | +ENV TMP_DIR=/home/${USERNAME}/tmp |
| 41 | + |
| 42 | +RUN mkdir /run/user/$USERID \ |
| 43 | + && mkdir /home/${USERNAME}/.ansible \ |
| 44 | + && mkdir ${TMP_DIR} |
| 45 | + |
| 46 | +COPY requirements.yml ${TMP_DIR}/requirements.yml |
| 47 | + |
| 48 | +RUN chown -R $USERNAME /home/$USERNAME \ |
| 49 | + && chown -R $USERNAME /run/user/$USERID |
| 50 | + |
| 51 | +# install npm tools: yarn |
| 52 | +ENV NPM_CONFIG_LOGLEVEL=warn NG_CLI_ANALYTICS=false |
| 53 | +RUN npm install --location=global yarn pnpm @angular/cli@14 \ |
| 54 | + && npm cache clean --force |
| 55 | + |
| 56 | +USER $USERNAME |
| 57 | + |
| 58 | +RUN pip3 install $PACKAGES_PYTHON --user |
| 59 | + |
| 60 | +# RUN ansible-galaxy install -c -r ${TMP_DIR}/requirements.yml |
| 61 | +RUN ansible-galaxy collection install -c -r ${TMP_DIR}/requirements.yml |
| 62 | + |
| 63 | +# install helm plugins helm push, appr && diff |
| 64 | +RUN helm plugin install --version 0.10.2 https://github.com/chartmuseum/helm-push.git \ |
| 65 | + && helm plugin install --version 0.7.0 https://github.com/app-registry/appr-helm-plugin.git \ |
| 66 | + && helm plugin install --version 3.4.2 https://github.com/databus23/helm-diff |
0 commit comments