-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add chrome and solr images with build system
We create a build system that automatically builds our images in different versions so that we can easily use them in our CI and update when needed. We create a workflow per image so that we only rebuild the image that's actually been updated. The images we add is a copy of `kingdutch/social-docker-chrome` as it's currently being used as well as a new SOLR image which matches what we use in our development docker-compose but is needed for the CI to be able to use SOLR as we can't change the entrypoint from the GitHub workflow configuration.
- Loading branch information
Showing
5 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Tag and release Chrome image | ||
|
||
on: | ||
push: | ||
paths: | ||
- "chrome/**" | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
SUBDIRECTORY: chrome | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: goalgorilla/ci-chrome | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
strategy: | ||
matrix: | ||
version: | ||
- 102 | ||
- 108 | ||
- 112 | ||
- latest | ||
|
||
# There should be no need to edit below this line. | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
build-args: | ||
- VERSION=${{ matrix.version }} | ||
context: "{{defaultContext}}:${{ env.SUBDIRECTORY }}" | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.version }} | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Tag and release Solr image | ||
|
||
on: | ||
push: | ||
paths: | ||
- "solr/**" | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
SUBDIRECTORY: solr | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: goalgorilla/ci-solr | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
strategy: | ||
matrix: | ||
version: | ||
- "8.11" | ||
- "9" | ||
- latest | ||
|
||
# There should be no need to edit below this line. | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
build-args: | ||
- VERSION=${{ matrix.version }} | ||
context: "{{defaultContext}}:${{ env.SUBDIRECTORY }}" | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.version }} | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# CI Images | ||
|
||
This repository contains images that are used in our CI processes. | ||
For example to change the entry point for Chrome or SOLR. | ||
|
||
This repository does not include output docker images such as those containing product or project | ||
code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG VERSION=latest | ||
|
||
FROM zenika/alpine-chrome:$VERSION | ||
|
||
# Disables GPU hardware acceleration. If software renderer is not in place, then the GPU process won't launch. | ||
# Disables the sandbox for all process types that are normally sandboxed. Meant to be used as a browser-level switch for testing purposes only. | ||
# Enables remote debug over HTTP on the specified port. | ||
# Enables remote debug over HTTP on the specified port. | ||
CMD ["--disable-gpu", "--no-sandbox", "--remote-debugging-address=0.0.0.0", "-remote-debugging-port=9222"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ARG VERSION=latest | ||
|
||
FROM solr:$VERSION | ||
|
||
ENTRYPOINT ["solr-precreate", "drupal", "/solr-conf"] |