Skip to content

Commit 36cefb0

Browse files
committed
Working Dockerfiles to produce mysql binaries from MySQL source or MariaDB package
0 parents  commit 36cefb0

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.zip
2+

Dockerfile.mariadb

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM amazonlinux
2+
3+
WORKDIR /root
4+
5+
RUN yum -y update && yum install -y tar gzip which zip mariadb binutils
6+
RUN mkdir -p /opt/bin /opt/lib
7+
8+
RUN cp /usr/bin/mysql* /usr/bin/aria_* /usr/bin/msql2mysql /usr/bin/my_print_defaults /opt/bin/
9+
RUN cp /usr/lib64/libncurses.so.6 /usr/lib64/libtinfo.so.6 /opt/lib/
10+
RUN cd /opt; strip bin/* lib/*; zip -9r /root/mariadb-layer.zip bin lib

Dockerfile.mysql

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM amazonlinux
2+
3+
WORKDIR /root
4+
5+
ARG VERSION=8.0.18
6+
7+
RUN yum -y update && yum install -y cmake3 make gcc-c++ ncurses-devel openssl-devel python-devel wget tar gzip which zip
8+
9+
RUN wget -q https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${VERSION}.tar.gz
10+
11+
RUN tar xzf mysql-${VERSION}.tar.gz
12+
RUN cd mysql-${VERSION}; mkdir build; cd build; cmake3 .. -DCMAKE_INSTALL_PREFIX=/opt -DWITHOUT_SERVER=ON -DDOWNLOAD_BOOST=ON -DWITH_BOOST=/root/boost && make install
13+
14+
RUN cp /usr/lib64/libncurses.so.6 /usr/lib64/libtinfo.so.6 /opt/lib/
15+
RUN cd /opt; strip bin/* lib/*; rm lib/*.a; zip -9r /root/mysql-${VERSION}-layer.zip bin lib share

0 commit comments

Comments
 (0)