Skip to content

Commit

Permalink
Rewrite DBs according to new convention
Browse files Browse the repository at this point in the history
  • Loading branch information
anarthal committed Jul 10, 2024
1 parent ae6b3a3 commit 6d4914d
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 56 deletions.
49 changes: 41 additions & 8 deletions .github/workflows/docker-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ jobs:
- { image: build-cmake3_8, dockerfile: build-cmake3_8, platforms: "linux/amd64", }
- { image: build-noopenssl, dockerfile: build-noopenssl, platforms: "linux/amd64", }
- { image: build-docs, dockerfile: build-docs, platforms: "linux/amd64", }
- { image: mysql5, dockerfile: mysql5, platforms: "linux/amd64", }
- { image: mysql8, dockerfile: mysql8, platforms: "linux/amd64, linux/arm64/v8" }
- { image: mysql9, dockerfile: mysql9, platforms: "linux/amd64, linux/arm64/v8" }
- { image: mariadb, dockerfile: mariadb, platforms: "linux/amd64, linux/arm64/v8" }

permissions:
contents: read
packages: write

runs-on: ubuntu-latest

Expand Down Expand Up @@ -73,3 +65,44 @@ jobs:
build-args: ${{ matrix.build-args }}
platforms: ${{ matrix.platforms }}
tags: ghcr.io/anarthal-containers/${{ matrix.image }}:${{ github.sha }}, ghcr.io/anarthal-containers/${{ matrix.image }}:latest


dbs:
strategy:
matrix:
include:
- { flavor: mysql, version: 5.7.41 }
- { flavor: mysql, version: 8.4.1, entrypoint-args: "--mysql-native-password=ON" }
- { flavor: mysql, version: 9.0.0 }
- { flavor: mariadb, version: 11.4.2 }

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: anarthal-containers
password: ${{ secrets.ANARTHAL_CONTAINERS_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
file: tools/docker/${{ matrix.flavor }}.dockerfile
build-args: |
BASE_IMAGE_VERSION=${{ matrix.version }}
ENTRYPOINT_ARGS=${{ matrix.entrypoint-args }}
platforms: "linux/amd64, linux/arm64/v8"
tags: ghcr.io/anarthal-containers/ci-db:${{ matrix.flavor }}-${{ matrix.version }}-${{ github.sha }}
4 changes: 3 additions & 1 deletion tools/docker/mariadb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#

FROM mariadb:11.4.2
ARG BASE_IMAGE_VERSION

FROM mariadb:${BASE_IMAGE_VERSION}

ENV MYSQL_ALLOW_EMPTY_PASSWORD=1
ENV MYSQL_ROOT_PASSWORD=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#

FROM mysql:5.7.41
ARG BASE_IMAGE_VERSION

FROM mysql:${BASE_IMAGE_VERSION}

# Must appear after FROM, otherwise its value gets cleared
ARG ENTRYPOINT_ARGS

ENV MYSQL_ALLOW_EMPTY_PASSWORD=1
ENV MYSQL_ROOT_PASSWORD=
Expand All @@ -16,7 +21,7 @@ COPY tools/ssl/*.pem /etc/ssl/certs/mysql/
# Custom entry point to correctly set UNIX socket permissions, even if using volumes
RUN <<EOF cat > /mysql_entrypoint.sh
chown -R mysql:mysql /var/run/mysqld
/bin/bash /usr/local/bin/docker-entrypoint.sh mysqld
/bin/bash /usr/local/bin/docker-entrypoint.sh mysqld ${ENTRYPOINT_ARGS}
EOF

ENTRYPOINT ["/bin/bash", "/mysql_entrypoint.sh"]
23 changes: 0 additions & 23 deletions tools/docker/mysql8.dockerfile

This file was deleted.

22 changes: 0 additions & 22 deletions tools/docker/mysql9.dockerfile

This file was deleted.

0 comments on commit 6d4914d

Please sign in to comment.