From 7e2d45c4b917985e74a4b4eb5869be75e8073d67 Mon Sep 17 00:00:00 2001 From: yamatcha Date: Thu, 21 Sep 2023 06:18:33 +0000 Subject: [PATCH] Add MySQL 8.0.33 an 8.0.34 containers --- containers/mysql/8.0.33/.dockerignore | 1 + containers/mysql/8.0.33/Dockerfile | 40 +++++++++++++++++++ containers/mysql/8.0.33/TAG | 1 + .../8.0.33/container-structure-test.yaml | 15 +++++++ containers/mysql/8.0.34/.dockerignore | 1 + containers/mysql/8.0.34/Dockerfile | 40 +++++++++++++++++++ containers/mysql/8.0.34/TAG | 1 + .../8.0.34/container-structure-test.yaml | 15 +++++++ 8 files changed, 114 insertions(+) create mode 100644 containers/mysql/8.0.33/.dockerignore create mode 100644 containers/mysql/8.0.33/Dockerfile create mode 100644 containers/mysql/8.0.33/TAG create mode 100644 containers/mysql/8.0.33/container-structure-test.yaml create mode 100644 containers/mysql/8.0.34/.dockerignore create mode 100644 containers/mysql/8.0.34/Dockerfile create mode 100644 containers/mysql/8.0.34/TAG create mode 100644 containers/mysql/8.0.34/container-structure-test.yaml diff --git a/containers/mysql/8.0.33/.dockerignore b/containers/mysql/8.0.33/.dockerignore new file mode 100644 index 000000000..72e8ffc0d --- /dev/null +++ b/containers/mysql/8.0.33/.dockerignore @@ -0,0 +1 @@ +* diff --git a/containers/mysql/8.0.33/Dockerfile b/containers/mysql/8.0.33/Dockerfile new file mode 100644 index 000000000..e93c80907 --- /dev/null +++ b/containers/mysql/8.0.33/Dockerfile @@ -0,0 +1,40 @@ +FROM quay.io/cybozu/ubuntu-dev:22.04 AS builder + +ARG MYSQL_VERSION=8.0.33 + +RUN apt-get update && apt-get -y install --no-install-recommends \ + cmake \ + libncurses5-dev \ + libjemalloc-dev \ + libnuma-dev \ + libaio-dev \ + pkg-config + +RUN cd tmp/ \ + && curl -fsSL -O https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${MYSQL_VERSION}.tar.gz \ + && tar -x -z -f mysql-boost-${MYSQL_VERSION}.tar.gz \ + && cd mysql-${MYSQL_VERSION} \ + && mkdir bld \ + && cd bld \ + && cmake .. -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DWITH_BOOST=$(ls -d ../boost/boost_*) -DWITH_NUMA=1 -DWITH_JEMALLOC=1 -DWITH_PACKAGE_FLAGS=0 \ + && make -j 20 \ + && make install + +FROM quay.io/cybozu/ubuntu:22.04 + +COPY --from=builder /usr/local/mysql/LICENSE /usr/local/mysql/LICENSE +COPY --from=builder /usr/local/mysql/bin /usr/local/mysql/bin +COPY --from=builder /usr/local/mysql/lib /usr/local/mysql/lib +COPY --from=builder /usr/local/mysql/share /usr/local/mysql/share + +RUN apt-get update \ + && apt-get install -y --no-install-recommends libjemalloc2 libnuma1 libaio1 \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /var/lib/mysql \ + && chown -R 10000:10000 /var/lib/mysql + +ENV PATH=/usr/local/mysql/bin:"$PATH" +VOLUME /var/lib/mysql +ENTRYPOINT ["mysqld"] +EXPOSE 3306 33060 33062 8080 +USER 10000:10000 diff --git a/containers/mysql/8.0.33/TAG b/containers/mysql/8.0.33/TAG new file mode 100644 index 000000000..da5bba3bc --- /dev/null +++ b/containers/mysql/8.0.33/TAG @@ -0,0 +1 @@ +8.0.33.1 diff --git a/containers/mysql/8.0.33/container-structure-test.yaml b/containers/mysql/8.0.33/container-structure-test.yaml new file mode 100644 index 000000000..b13360964 --- /dev/null +++ b/containers/mysql/8.0.33/container-structure-test.yaml @@ -0,0 +1,15 @@ +schemaVersion: '2.0.0' +fileExistenceTests: +- name: 'mysqld' + path: '/usr/local/mysql/bin/mysqld' + shouldExist: true + isExecutableBy: 'owner' +- name: 'mysql lib' + path: '/usr/local/mysql/lib' + shouldExist: true +- name: 'mysql share' + path: '/usr/local/mysql/share' + shouldExist: true +- name: 'mysql LICENSE' + path: '/usr/local/mysql/LICENSE' + shouldExist: true diff --git a/containers/mysql/8.0.34/.dockerignore b/containers/mysql/8.0.34/.dockerignore new file mode 100644 index 000000000..72e8ffc0d --- /dev/null +++ b/containers/mysql/8.0.34/.dockerignore @@ -0,0 +1 @@ +* diff --git a/containers/mysql/8.0.34/Dockerfile b/containers/mysql/8.0.34/Dockerfile new file mode 100644 index 000000000..d81942f25 --- /dev/null +++ b/containers/mysql/8.0.34/Dockerfile @@ -0,0 +1,40 @@ +FROM quay.io/cybozu/ubuntu-dev:22.04 AS builder + +ARG MYSQL_VERSION=8.0.34 + +RUN apt-get update && apt-get -y install --no-install-recommends \ + cmake \ + libncurses5-dev \ + libjemalloc-dev \ + libnuma-dev \ + libaio-dev \ + pkg-config + +RUN cd tmp/ \ + && curl -fsSL -O https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${MYSQL_VERSION}.tar.gz \ + && tar -x -z -f mysql-boost-${MYSQL_VERSION}.tar.gz \ + && cd mysql-${MYSQL_VERSION} \ + && mkdir bld \ + && cd bld \ + && cmake .. -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DWITH_BOOST=$(ls -d ../boost/boost_*) -DWITH_NUMA=1 -DWITH_JEMALLOC=1 -DWITH_PACKAGE_FLAGS=0 \ + && make -j 20 \ + && make install + +FROM quay.io/cybozu/ubuntu:22.04 + +COPY --from=builder /usr/local/mysql/LICENSE /usr/local/mysql/LICENSE +COPY --from=builder /usr/local/mysql/bin /usr/local/mysql/bin +COPY --from=builder /usr/local/mysql/lib /usr/local/mysql/lib +COPY --from=builder /usr/local/mysql/share /usr/local/mysql/share + +RUN apt-get update \ + && apt-get install -y --no-install-recommends libjemalloc2 libnuma1 libaio1 \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /var/lib/mysql \ + && chown -R 10000:10000 /var/lib/mysql + +ENV PATH=/usr/local/mysql/bin:"$PATH" +VOLUME /var/lib/mysql +ENTRYPOINT ["mysqld"] +EXPOSE 3306 33060 33062 8080 +USER 10000:10000 diff --git a/containers/mysql/8.0.34/TAG b/containers/mysql/8.0.34/TAG new file mode 100644 index 000000000..63acc12b6 --- /dev/null +++ b/containers/mysql/8.0.34/TAG @@ -0,0 +1 @@ +8.0.34.1 diff --git a/containers/mysql/8.0.34/container-structure-test.yaml b/containers/mysql/8.0.34/container-structure-test.yaml new file mode 100644 index 000000000..b13360964 --- /dev/null +++ b/containers/mysql/8.0.34/container-structure-test.yaml @@ -0,0 +1,15 @@ +schemaVersion: '2.0.0' +fileExistenceTests: +- name: 'mysqld' + path: '/usr/local/mysql/bin/mysqld' + shouldExist: true + isExecutableBy: 'owner' +- name: 'mysql lib' + path: '/usr/local/mysql/lib' + shouldExist: true +- name: 'mysql share' + path: '/usr/local/mysql/share' + shouldExist: true +- name: 'mysql LICENSE' + path: '/usr/local/mysql/LICENSE' + shouldExist: true