Skip to content

Commit

Permalink
collations: implement collation dumping as a docker image (#13879)
Browse files Browse the repository at this point in the history
Signed-off-by: Vicent Marti <[email protected]>
  • Loading branch information
vmg authored Aug 30, 2023
1 parent ce389fa commit c2b62b7
Show file tree
Hide file tree
Showing 3 changed files with 446 additions and 0 deletions.
20 changes: 20 additions & 0 deletions go/mysql/collations/tools/colldump/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM debian:latest

ARG MYSQL_VERSION=8.0.34

RUN apt-get update && apt-get -y install curl cmake build-essential libssl-dev libncurses5-dev pkg-config rapidjson-dev

RUN cd /tmp && \
curl -OL https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${MYSQL_VERSION}.tar.gz && \
tar zxvf mysql-${MYSQL_VERSION}.tar.gz

ADD colldump.cc /tmp/mysql-${MYSQL_VERSION}/strings/colldump.cc
RUN echo "MYSQL_ADD_EXECUTABLE(colldump colldump.cc SKIP_INSTALL)\nTARGET_LINK_LIBRARIES(colldump strings)\n" >> /tmp/mysql-${MYSQL_VERSION}/strings/CMakeLists.txt

RUN cd /tmp/mysql-${MYSQL_VERSION} && \
mkdir build && \
cd build && \
cmake -DDOWNLOAD_BOOST=1 -DWITH_BOOST=dist/boost .. && \
make colldump

RUN mkdir /mysql-collations && /tmp/mysql-${MYSQL_VERSION}/build/runtime_output_directory/colldump /mysql-collations
Loading

0 comments on commit c2b62b7

Please sign in to comment.