Skip to content

Commit 6757de3

Browse files
Merge pull request #774 from cybozu-go/issue-772
issue-772: build MySQL 8.0.41
2 parents 0144d54 + 728ee5c commit 6757de3

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

containers/mysql/8.0.41/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

containers/mysql/8.0.41/Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM ghcr.io/cybozu/ubuntu-dev:22.04 AS builder
2+
3+
ARG MYSQL_VERSION=8.0.41
4+
5+
RUN apt-get update && apt-get -y install --no-install-recommends \
6+
cmake \
7+
libncurses5-dev \
8+
libjemalloc-dev \
9+
libnuma-dev \
10+
libaio-dev \
11+
pkg-config
12+
13+
RUN cd tmp/ \
14+
&& curl -fsSL -O https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${MYSQL_VERSION}.tar.gz \
15+
&& tar -x -z -f mysql-boost-${MYSQL_VERSION}.tar.gz \
16+
&& cd mysql-${MYSQL_VERSION} \
17+
&& mkdir bld \
18+
&& cd bld \
19+
&& 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 \
20+
&& make -j 20 \
21+
&& make install
22+
23+
FROM ghcr.io/cybozu/ubuntu:22.04
24+
25+
COPY --from=builder /usr/local/mysql/LICENSE /usr/local/mysql/LICENSE
26+
COPY --from=builder /usr/local/mysql/bin /usr/local/mysql/bin
27+
COPY --from=builder /usr/local/mysql/lib /usr/local/mysql/lib
28+
COPY --from=builder /usr/local/mysql/share /usr/local/mysql/share
29+
30+
RUN apt-get update \
31+
&& apt-get install -y --no-install-recommends libjemalloc2 libnuma1 libaio1 \
32+
&& rm -rf /var/lib/apt/lists/* \
33+
&& mkdir -p /var/lib/mysql \
34+
&& chown -R 10000:10000 /var/lib/mysql
35+
36+
ENV PATH=/usr/local/mysql/bin:"$PATH"
37+
VOLUME /var/lib/mysql
38+
ENTRYPOINT ["mysqld"]
39+
EXPOSE 3306 33060 33062 8080
40+
USER 10000:10000

containers/mysql/8.0.41/TAG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.0.41.1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
schemaVersion: '2.0.0'
2+
fileExistenceTests:
3+
- name: 'mysqld'
4+
path: '/usr/local/mysql/bin/mysqld'
5+
shouldExist: true
6+
isExecutableBy: 'owner'
7+
- name: 'mysql lib'
8+
path: '/usr/local/mysql/lib'
9+
shouldExist: true
10+
- name: 'mysql share'
11+
path: '/usr/local/mysql/share'
12+
shouldExist: true
13+
- name: 'mysql LICENSE'
14+
path: '/usr/local/mysql/LICENSE'
15+
shouldExist: true

0 commit comments

Comments
 (0)