Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
BDRK-3516: Add GitHub Runners custom Docker image (#48)
Browse files Browse the repository at this point in the history
* BDRK-3516: Add GitHub Runners custom Docker image

* Test Docker build job

* Update other tools in managed-images

* Remove custom branch
  • Loading branch information
tunguyen9889 authored Dec 24, 2021
1 parent e39c4f2 commit 114f813
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 12 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build_docker.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Build Docker images
on:
pull_request:
types: [opened, ready_for_review, reopened, synchronize]
push:
branches:
- master
Expand All @@ -10,10 +12,15 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: [self-hosted, docker, integration]
strategy:
matrix:
repo: ["consul-backup-gcs", "eks-container-insights", "fluentd"]
repo:
- consul-backup-gcs
- eks-container-insights
- fluentd
- actions-runner
- actions-runner-dind
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
test:
name: Test
runs-on: ubuntu-latest
runs-on: [self-hosted, docker, integration]
env:
TEST_IMAGE: "quay.io/helmpack/chart-testing:v3.0.0"
BATS_IMAGE: "basisai/bats-helm:v1.2.1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
runs-on: ubuntu-latest
runs-on: [self-hosted, docker, integration]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
26 changes: 26 additions & 0 deletions dockerfiles/actions-runner-dind/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM summerwind/actions-runner-dind:v2.286.0-ubuntu-20.04

USER root

ENV SKOPEO_VERSION 100:1.3.0-1
ENV YQ_VERSION v4.16.2

RUN mkdir -p /tmp/aws \
&& cd /tmp/aws \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf /tmp/aws

RUN . /etc/os-release \
&& echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" \
| tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \
&& curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key \
| apt-key add - \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install skopeo=${SKOPEO_VERSION} \
&& wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 \
&& chmod +x /usr/local/bin/yq \
&& rm -rf /var/lib/apt/lists/*

USER runner
5 changes: 5 additions & 0 deletions dockerfiles/actions-runner-dind/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Custom Docker image for GitHub Actions Runner Docker-In-Docker (dind)

This Docker image based off the the [actions-runner-dind image](https://github.com/actions-runner-controller/actions-runner-controller/blob/master/runner/Dockerfile.dindrunner) with `skopeo`, `yq` and `awscli` installed.

It is built and published to [`quay.io/basisai/actions-runner-dind`](https://quay.io/repository/basisai/actions-runner-dind).
26 changes: 26 additions & 0 deletions dockerfiles/actions-runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM summerwind/actions-runner:v2.286.0-ubuntu-20.04

USER root

ENV SKOPEO_VERSION 100:1.3.0-1
ENV YQ_VERSION v4.16.2

RUN mkdir -p /tmp/aws \
&& cd /tmp/aws \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf /tmp/aws

RUN . /etc/os-release \
&& echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" \
| tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \
&& curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key \
| apt-key add - \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install skopeo=${SKOPEO_VERSION} \
&& wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 \
&& chmod +x /usr/local/bin/yq \
&& rm -rf /var/lib/apt/lists/*

USER runner
5 changes: 5 additions & 0 deletions dockerfiles/actions-runner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Custom Docker image for GitHub Actions Runner

This Docker image based off the the [actions-runner image](https://github.com/actions-runner-controller/actions-runner-controller/blob/master/runner/Dockerfile) with `skopeo`, `yq` and `awscli` installed.

It is built and published to [`quay.io/basisai/actions-runner`](https://quay.io/repository/basisai/actions-runner).
6 changes: 3 additions & 3 deletions dockerfiles/consul-backup-gcs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM google/cloud-sdk:355.0.0
FROM google/cloud-sdk:367.0.0

ARG ansible_version=2.9.25
ARG consul_version=1.10.2
ARG ansible_version=2.9.27
ARG consul_version=1.11.1

RUN set -xe \
&& apt-get update \
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/eks-container-insights/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM fluent/fluentd-kubernetes-daemonset:v1.13.3-debian-cloudwatch-amd64-1.2
FROM fluent/fluentd-kubernetes-daemonset:v1.14.3-debian-cloudwatch-amd64-1.0

RUN gem install fluent-plugin-s3 -v 1.6.0 --no-document
RUN gem install fluent-plugin-s3 -v 1.6.1 --no-document
6 changes: 3 additions & 3 deletions dockerfiles/fluentd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM quay.io/fluentd_elasticsearch/fluentd:v3.2.0
FROM quay.io/fluentd_elasticsearch/fluentd:v3.3.0

RUN fluent-gem install digest-crc --version 0.5.1 --no-document \
RUN fluent-gem install digest-crc --version 0.6.4 --no-document \
&& fluent-gem install fluent-plugin-gcs --version 0.4.1 --no-document \
&& fluent-gem install fluent-plugin-s3 --version 1.6.0 --no-document
&& fluent-gem install fluent-plugin-s3 --version 1.6.1 --no-document

0 comments on commit 114f813

Please sign in to comment.