一、准备环境
Docker version 19.03.4-ce, build 9013bf583a
mysql-8.0.18
CentOS Linux release 8.0.1905 (Core)
二、部署
2.1、创建目录
mkdir -p ~/docker/mysql/data
2.2、下载数据库文件到mysql目录下
2.3、创建Dockerfile
FROM centos:v2
MAINTAINER superjay09
RUN mkdir -p /usr/local/mysql/{
data,tmp,binlog,log/innodb_log,innodb_ts}
ADD mysql-8.0.18.tar.gz /opt
ADD rpcsvc-proto-1.4.tar.gz /opt
ADD my.cnf /etc
RUN dnf -y update
RUN dnf -y install epel-release gcc gcc-c++ vim make \
autoconf openssl openssl-devel cmake ncurses ncurses-devel \
libaio-devel openssl openssl-devel pcre pcre-devel \
zlib zlib-devel libtool libtirpc-devel net-tools
RUN dnf clean all
RUN dnf makecache
RUN cd /opt/rpcsvc-proto-1.4 && ./configure && make && make install
RUN mkdir -p /opt/mysql-8.0.18/build && cd /opt/mysql-8.0.18/build
RU