From d12e8e1a9987bca1fa8d7508ae8f4865d2e8e5e9 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 8 Sep 2024 20:49:55 -0700 Subject: [PATCH] Repo reorganization --- .github/workflows/build-alpine.yml | 6 +++--- .github/workflows/build-ubi.yml | 4 ++-- Dockerfile => Alpine/Dockerfile | 0 UBI/Dockerfile | 17 +++++++++++++++++ 4 files changed, 22 insertions(+), 5 deletions(-) rename Dockerfile => Alpine/Dockerfile (100%) create mode 100644 UBI/Dockerfile diff --git a/.github/workflows/build-alpine.yml b/.github/workflows/build-alpine.yml index 35c6cd3..95b545a 100644 --- a/.github/workflows/build-alpine.yml +++ b/.github/workflows/build-alpine.yml @@ -32,8 +32,8 @@ jobs: - name: Extract version for tags run: | - echo "FULL_VERSION=$(grep -oP '(?<=VERSION=).*' Dockerfile)" >> $GITHUB_ENV - echo "MAJOR_VERSION=$(grep -oP '(?<=VERSION=).*' Dockerfile | head -c2)" >> $GITHUB_ENV + echo "FULL_VERSION=$(grep -oP '(?<=VERSION=).*' Alpine/Dockerfile)" >> $GITHUB_ENV + echo "MAJOR_VERSION=$(grep -oP '(?<=VERSION=).*' Alpine/Dockerfile | head -c2)" >> $GITHUB_ENV # Add support for more platforms with QEMU (optional) # https://github.com/docker/setup-qemu-action @@ -65,7 +65,7 @@ jobs: id: build-and-push uses: docker/build-push-action@v6 with: - context: . + context: Alpine platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/build-ubi.yml b/.github/workflows/build-ubi.yml index 29c8d25..a3dcaf0 100644 --- a/.github/workflows/build-ubi.yml +++ b/.github/workflows/build-ubi.yml @@ -32,7 +32,7 @@ jobs: - name: Extract version for tags run: | - echo "FULL_VERSION=$(grep -oP '(?<=VERSION=).*' Dockerfile)" >> $GITHUB_ENV + echo "FULL_VERSION=$(grep -oP '(?<=VERSION=).*' UBI/Dockerfile)" >> $GITHUB_ENV # Add support for more platforms with QEMU (optional) # https://github.com/docker/setup-qemu-action @@ -64,7 +64,7 @@ jobs: id: build-and-push uses: docker/build-push-action@v6 with: - context: . + context: UBI platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} diff --git a/Dockerfile b/Alpine/Dockerfile similarity index 100% rename from Dockerfile rename to Alpine/Dockerfile diff --git a/UBI/Dockerfile b/UBI/Dockerfile new file mode 100644 index 0000000..1dd0353 --- /dev/null +++ b/UBI/Dockerfile @@ -0,0 +1,17 @@ +ARG VERSION=11 + +FROM mariadb:${VERSION}-ubi + +LABEL maintainer="Thien Tran contact@tommytran.io" + +USER root + +RUN microdnf -y upgrade \ + && rm -rf /usr/local/bin/gosu \ + && curl https://copr.fedorainfracloud.org/coprs/secureblue/hardened_malloc/repo/rhel-9/secureblue-hardened_malloc-rhel-9.repo \ + -o /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:secureblue:hardened_malloc.repo \ + && microdnf install -y crypto-policies-scripts hardened_malloc \ + && update-crypto-policies --set FUTURE \ + && echo libhardened_malloc.so > /etc/ld.so.preload + +USER mysql \ No newline at end of file