关于构建aarch64环境Mysql8.0的Docker镜像问题

目录
  • 1. 获取构建mysql镜像的脚本
  • 2.预先下载gosu-arm64、gosu-arm64.asc ,并放到mysql/8.0目录下
  • 3.修改Dockerfile.oracle,使用本地下载的gosu
  • 4.执行构建Docker镜像

1. 获取构建mysql镜像的脚本

git clone https://github.com/docker-library/mysql.git

2.预先下载gosu-arm64、gosu-arm64.asc ,并放到mysql/8.0目录下

wget -c https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64

wget -c https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64.asc

3.修改Dockerfile.oracle,使用本地下载的gosu

#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM oraclelinux:8-slim
RUN set -eux; \
        groupadd --system --gid 999 mysql; \
        useradd --system --uid 999 --gid 999 --home-dir /var/lib/mysql --no-create-home mysql; \
        \
        mkdir /var/lib/mysql /var/run/mysqld; \
        chown mysql:mysql /var/lib/mysql /var/run/mysqld; \
# ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
        chmod 1777 /var/lib/mysql /var/run/mysqld; \
        \
        mkdir /docker-entrypoint-initdb.d
# add gosu for easy step-down from root
# https://github.com/tianon/gosu/releases
ENV GOSU_VERSION 1.14
COPY ./gosu-arm64 /usr/local/bin/gosu
COPY ./gosu-arm64.asc /usr/local/bin/gosu.asc
RUN set -eux; \
# TODO find a better userspace architecture detection method than querying the kernel
        arch="$(uname -m)"; \
        case "$arch" in \
                aarch64) gosuArch='arm64' ;; \
                x86_64) gosuArch='amd64' ;; \
                *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;; \
        esac; \
#       curl -fL -o /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$gosuArch.asc"; \
#       curl -fL -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$gosuArch"; \
        export GNUPGHOME="$(mktemp -d)"; \
        gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
#       gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
        rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
        chmod +x /usr/local/bin/gosu; \
        gosu --version; \
        gosu nobody true
RUN set -eux; \
        microdnf install -y \
                gzip \
                openssl \
                xz \
                zstd \
# Oracle Linux 8+ is very slim :)
                findutils \
        ; \
        microdnf clean all
RUN set -eux; \
# https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html
# gpg: key 3A79BD29: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
        key='859BE8D7C586F538430B19C2467B942D3A79BD29'; \
        export GNUPGHOME="$(mktemp -d)"; \
        gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
        gpg --batch --export --armor "$key" > /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql; \
        rm -rf "$GNUPGHOME"
ENV MYSQL_MAJOR 8.0
ENV MYSQL_VERSION 8.0.28-1.el8
RUN set -eu; \
        . /etc/os-release; \
        { \
                echo '[mysql8.0-server-minimal]'; \
                echo 'name=MySQL 8.0 Server Minimal'; \
                echo 'enabled=1'; \
                echo "baseurl=https://repo.mysql.com/yum/mysql-8.0-community/docker/el/${VERSION_ID%%[.-]*}/\$basearch/"; \
                echo 'gpgcheck=1'; \
                echo 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql'; \
# https://github.com/docker-library/mysql/pull/680#issuecomment-825930524
                echo 'module_hotfixes=true'; \
        } | tee /etc/yum.repos.d/mysql-community-minimal.repo
RUN set -eux; \
        microdnf install -y "mysql-community-server-minimal-$MYSQL_VERSION"; \
        microdnf clean all; \
# the "socket" value in the Oracle packages is set to "/var/lib/mysql" which isn't a great place for the socket (we want it in "/var/run/mysqld" instead)
# https://github.com/docker-library/mysql/pull/680#issuecomment-636121520
        grep -F 'socket=/var/lib/mysql/mysql.sock' /etc/my.cnf; \
        sed -i 's!^socket=.*!socket=/var/run/mysqld/mysqld.sock!' /etc/my.cnf; \
        grep -F 'socket=/var/run/mysqld/mysqld.sock' /etc/my.cnf; \
        { echo '[client]'; echo 'socket=/var/run/mysqld/mysqld.sock'; } >> /etc/my.cnf; \
        \
# make sure users dumping files in "/etc/mysql/conf.d" still works
        ! grep -F '!includedir' /etc/my.cnf; \
        { echo; echo '!includedir /etc/mysql/conf.d/'; } >> /etc/my.cnf; \
        mkdir -p /etc/mysql/conf.d; \
        \
        mysqld --version; \
        mysql --version
RUN set -eu; \
        . /etc/os-release; \
        { \
                echo '[mysql-tools-community]'; \
                echo 'name=MySQL Tools Community'; \
                echo "baseurl=https://repo.mysql.com/yum/mysql-tools-community/el/${VERSION_ID%%[.-]*}/\$basearch/"; \
                echo 'enabled=1'; \
                echo 'gpgcheck=1'; \
                echo 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql'; \
# https://github.com/docker-library/mysql/pull/680#issuecomment-825930524
                echo 'module_hotfixes=true'; \
        } | tee /etc/yum.repos.d/mysql-community-tools.repo
ENV MYSQL_SHELL_VERSION 8.0.28-1.el8
RUN set -eux; \
        microdnf install -y "mysql-shell-$MYSQL_SHELL_VERSION"; \
        microdnf clean all; \
        \
        mysqlsh --version
VOLUME /var/lib/mysql
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 3306 33060
CMD ["mysqld"]

4.执行构建Docker镜像

[uos@localhost 8.0]$ docker build -f ./Dockerfile.oracle -t arm64uos/oracle-mysql:8.0 .
   Sending build context to Docker daemon 2.265MB
   Step 1/20 : FROM oraclelinux:8-slim
   8-slim: Pulling from library/oraclelinux
  293fbd461d2c: Pull complete
   Digest: sha256:d36eb5962270036295bc6c9409a191abe8d9683be5641d20d124df52c5abb587
   Status: Downloaded newer image for oraclelinux:8-slim
   ---> 7f0650a84bb9
   Step 2/20 : RUN set -eux; groupadd --system --gid 999 mysql; useradd --system --uid 999 --gid 999 --home-dir /var/lib/mysql --no-create-home mysql; mkdir /var/lib/mysql /var/run/mysqld; chown mysql:mysql /var/lib/mysql /var/run/mysqld; chmod 1777 /var/lib/mysql /var/run/mysqld; mkdir /docker-entrypoint-initdb.d
  ---> Running in a96e89974f96
  + groupadd --system --gid 999 mysql
  + useradd --system --uid 999 --gid 999 --home-dir /var/lib/mysql --no-create-home mysql
  + mkdir /var/lib/mysql /var/run/mysqld
  + chown mysql:mysql /var/lib/mysql /var/run/mysqld
  + chmod 1777 /var/lib/mysql /var/run/mysqld
  + mkdir /docker-entrypoint-initdb.d
  Removing intermediate container a96e89974f96
  ---> aaaa3a268e6a
  Step 3/20 : ENV GOSU_VERSION 1.14
  ---> Running in dee510f38ad9
  Removing intermediate container dee510f38ad9
  ---> 61b74ea8e658
  Step 4/20 : COPY ./gosu-arm64 /usr/local/bin/gosu
  ---> f573051a6ef2
  Step 5/20 : COPY ./gosu-arm64.asc /usr/local/bin/gosu.asc
  ---> 14a1cd823dc6
  Step 6/20 : RUN set -eux; arch="$(uname -m)"; case "$arch" in aarch64) gosuArch='arm64' ;; x86_64) gosuArch='amd64' ;; *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;; esac; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; chmod +x /usr/local/bin/gosu; gosu --version; gosu nobody true
  ---> Running in 7a2def91005f
  ++ uname -m
  + arch=aarch64
  + case "$arch" in
  + gosuArch=arm64
  ++ mktemp -d
  + export GNUPGHOME=/tmp/tmp.C3hcKppY6K
  + GNUPGHOME=/tmp/tmp.C3hcKppY6K
  + gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
  gpg: keybox '/tmp/tmp.C3hcKppY6K/pubring.kbx' created
  gpg: /tmp/tmp.C3hcKppY6K/trustdb.gpg: trustdb created
  gpg: key 036A9C25BF357DD4: public key "Tianon Gravi <tianon@tianon.xyz>" imported
  gpg: Total number processed: 1
  gpg: imported: 1
  + rm -rf /tmp/tmp.C3hcKppY6K /usr/local/bin/gosu.asc
  + chmod +x /usr/local/bin/gosu
  + gosu --version
  1.14 (go1.16.7 on linux/arm64; gc)
  + gosu nobody true
 Removing intermediate container 7a2def91005f
  ---> 497704b804d2
  Step 7/20 : RUN set -eux; microdnf install -y gzip openssl xz zstd findutils ; microdnf clean all
  ---> Running in 05b43fc314d9
  + microdnf install -y gzip openssl xz zstd findutils
  Downloading metadata...
  Package Repository Size
  Installing:
  findutils-1:4.6.0-20.el8.aarch64 ol8_baseos_latest 537.4 kB
  gzip-1.9-12.el8.aarch64 ol8_baseos_latest 168.3 kB
  openssl-1:1.1.1k-6.el8_5.aarch64 ol8_baseos_latest 706.2 kB
  xz-5.2.4-3.el8.aarch64 ol8_baseos_latest 156.1 kB
  zstd-1.4.4-1.0.1.el8.aarch64 ol8_appstream 310.0 kB
  Transaction Summary:
  Installing: 5 packages
  Reinstalling: 0 packages
  Upgrading: 0 packages
  Obsoleting: 0 packages
  Removing: 0 packages
  Downgrading: 0 packages
  Downloading packages...
  Running transaction test...
  Installing: zstd;1.4.4-1.0.1.el8;aarch64;ol8_appstream
  Installing: xz;5.2.4-3.el8;aarch64;ol8_baseos_latest
  Installing: openssl;1:1.1.1k-6.el8_5;aarch64;ol8_baseos_latest
  Installing: gzip;1.9-12.el8;aarch64;ol8_baseos_latest
  Installing: findutils;1:4.6.0-20.el8;aarch64;ol8_baseos_latest
  Complete.
  + microdnf clean all
  Removing intermediate container 05b43fc314d9
  ---> 198bc6b97443
  Step 8/20 : RUN set -eux; key='859BE8D7C586F538430B19C2467B942D3A79BD29'; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; gpg --batch --export --armor "$key" > /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql; rm -rf "$GNUPGHOME"
  ---> Running in e0272592ac40
  + key=859BE8D7C586F538430B19C2467B942D3A79BD29
  + export GNUPGHOME=/tmp/tmp.de2UOzFBxB
  + GNUPGHOME=/tmp/tmp.de2UOzFBxB
  + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 859BE8D7C586F538430B19C2467B942D3A79BD29
  gpg: keybox '/tmp/tmp.de2UOzFBxB/pubring.kbx' created
 gpg: /tmp/tmp.de2UOzFBxB/trustdb.gpg: trustdb created
 gpg: key 467B942D3A79BD29: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
 gpg: imported: 1
  + gpg --batch --export --armor 859BE8D7C586F538430B19C2467B942D3A79BD29
  + rm -rf /tmp/tmp.de2UOzFBxB
  Removing intermediate container e0272592ac40
 ---> 3bf34d537ce4
  Step 9/20 : ENV MYSQL_MAJOR 8.0
  ---> Running in f74c1276a825
 Removing intermediate container f74c1276a825
 ---> 71115750eae1
Step 10/20 : ENV MYSQL_VERSION 8.0.28-1.el8
 ---> Running in add5007830f4
 Removing intermediate container add5007830f4
 ---> 329e98f9e6ea
 Step 11/20 : RUN set -eu; . /etc/os-release; { echo '[mysql8.0-server-minimal]'; echo 'name=MySQL 8.0 Server Minimal'; echo 'enabled=1'; echo "baseurl=https://repo.mysql.com/yum/mysql-8.0-community/docker/el/${VERSION_ID%%[.-]*}/\$basearch/"; echo 'gpgcheck=1'; echo 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql'; echo 'module_hotfixes=true'; } | tee /etc/yum.repos.d/mysql-community-minimal.repo
 ---> Running in 098701a53769
 [mysql8.0-server-minimal]
 name=MySQL 8.0 Server Minimal
 enabled=1
 baseurl=https://repo.mysql.com/yum/mysql-8.0-community/docker/el/8/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
 module_hotfixes=true
 Removing intermediate container 098701a53769
 ---> 81e9656252a7
 Step 12/20 : RUN set -eux; microdnf install -y "mysql-community-server-minimal-$MYSQL_VERSION"; microdnf clean all; grep -F 'socket=/var/lib/mysql/mysql.sock' /etc/my.cnf; sed -i 's!^socket=.*!socket=/var/run/mysqld/mysqld.sock!' /etc/my.cnf; grep -F 'socket=/var/run/mysqld/mysqld.sock' /etc/my.cnf; { echo '[client]'; echo 'socket=/var/run/mysqld/mysqld.sock'; } >> /etc/my.cnf; ! grep -F '!includedir' /etc/my.cnf; { echo; echo '!includedir /etc/mysql/conf.d/'; } >> /etc/my.cnf; mkdir -p /etc/mysql/conf.d; mysqld --version; mysql --version
 ---> Running in 5024aade5e13
+ microdnf install -y mysql-community-server-minimal-8.0.28-1.el8
 Downloading metadata...
 Package Repository Size
Installing:
 libaio-0.3.112-1.el8.aarch64 ol8_baseos_latest 33.2 kB
 libtirpc-1.1.4-5.0.1.el8.aarch64 ol8_baseos_latest 111.5 kB
 mysql-community-server-minimal-8.0.28-1.el8.aarch64 mysql8.0-server-minimal 33.3 MB
 Transaction Summary:
 Installing: 3 packages
 Reinstalling: 0 packages
 Upgrading: 0 packages
 Obsoleting: 0 packages
 Removing: 0 packages
 Downgrading: 0 packages
 Downloading packages...
 Running transaction test...
 Installing: libtirpc;1.1.4-5.0.1.el8;aarch64;ol8_baseos_latest
 Installing: libaio;0.3.112-1.el8;aarch64;ol8_baseos_latest
 Installing: mysql-community-server-minimal;8.0.28-1.el8;aarch64;mysql8.0-server-minimal
 Complete.
 + microdnf clean all
 + grep -F socket=/var/lib/mysql/mysql.sock /etc/my.cnf
 socket=/var/lib/mysql/mysql.sock
 + sed -i 's!^socket=.*!socket=/var/run/mysqld/mysqld.sock!' /etc/my.cnf
 + grep -F socket=/var/run/mysqld/mysqld.sock /etc/my.cnf
 socket=/var/run/mysqld/mysqld.sock
+ echo '[client]'
 + echo socket=/var/run/mysqld/mysqld.sock
 + grep -F '!includedir' /etc/my.cnf
 + echo
 + echo '!includedir /etc/mysql/conf.d/'
 + mkdir -p /etc/mysql/conf.d
 + mysqld --version
 /usr/sbin/mysqld Ver 8.0.28 for Linux on aarch64 (MySQL Community Server - GPL)
 + mysql --version
 mysql Ver 8.0.28 for Linux on aarch64 (MySQL Community Server - GPL)
Removing intermediate container 5024aade5e13
 ---> 75d6d11a0d4f
 Step 13/20 : RUN set -eu; . /etc/os-release; { echo '[mysql-tools-community]'; echo 'name=MySQL Tools Community'; echo "baseurl=https://repo.mysql.com/yum/mysql-tools-community/el/${VERSION_ID%%[.-]*}/\$basearch/"; echo 'enabled=1'; echo 'gpgcheck=1'; echo 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql'; echo 'module_hotfixes=true'; } | tee /etc/yum.repos.d/mysql-community-tools.repo
 ---> Running in 370f3e954c65
 [mysql-tools-community]
 name=MySQL Tools Community
 baseurl=https://repo.mysql.com/yum/mysql-tools-community/el/8/$basearch/
module_hotfixes=true
 Removing intermediate container 370f3e954c65
 ---> 930aadf4bd26
Step 14/20 : ENV MYSQL_SHELL_VERSION 8.0.28-1.el8
 ---> Running in 12cb073265f5
 Removing intermediate container 12cb073265f5
 ---> 146a70d69280
 Step 15/20 : RUN set -eux; microdnf install -y "mysql-shell-$MYSQL_SHELL_VERSION"; microdnf clean all; mysqlsh --version
 ---> Running in ded458b7a5c5
 + microdnf install -y mysql-shell-8.0.28-1.el8
Package Repository Size
 Installing:
 expat-2.2.5-4.0.1.el8_5.3.aarch64 ol8_baseos_latest 105.8 kB
 gdbm-libs-1:1.18-1.el8.aarch64 ol8_baseos_latest 60.5 kB
 libnsl2-1.2.0-2.20180605git4a062cf.el8.aarch64 ol8_baseos_latest 56.4 kB
 mysql-shell-8.0.28-1.el8.aarch64 mysql-tools-community 18.6 MB
 python39-libs-3.9.6-2.module+el8.5.0+20364+c7fe1181.aarch64 ol8_appstream 8.4 MB
 python39-pip-wheel-20.2.4-6.module+el8.5.0+20364+c7fe1181.noarch ol8_appstream 1.3 MB
 python39-setuptools-wheel-50.3.2-4.module+el8.5.0+20364+c7fe1181.noarch ol8_appstream 508.6 kB
 Installing: 7 packages
 Enabling module streams:
 python39:3.9
 Installing: python39-setuptools-wheel;50.3.2-4.module+el8.5.0+20364+c7fe1181;noarch;ol8_appstream
 Installing: python39-pip-wheel;20.2.4-6.module+el8.5.0+20364+c7fe1181;noarch;ol8_appstream
 Installing: libnsl2;1.2.0-2.20180605git4a062cf.el8;aarch64;ol8_baseos_latest
 Installing: gdbm-libs;1:1.18-1.el8;aarch64;ol8_baseos_latest
 Installing: expat;2.2.5-4.0.1.el8_5.3;aarch64;ol8_baseos_latest
 Installing: python39-libs;3.9.6-2.module+el8.5.0+20364+c7fe1181;aarch64;ol8_appstream
 Installing: mysql-shell;8.0.28-1.el8;aarch64;mysql-tools-community
+ mysqlsh --version
 Cannot set LC_ALL to locale en_US.UTF-8: No such file or directory
 mysqlsh Ver 8.0.28 for Linux on aarch64 - for MySQL 8.0.28 (MySQL Community Server (GPL))
 Removing intermediate container ded458b7a5c5
 ---> 242cc65de9a1
 Step 16/20 : VOLUME /var/lib/mysql
 ---> Running in 5cc99dcada97
 Removing intermediate container 5cc99dcada97
 ---> fd89b8c734f5
 Step 17/20 : COPY docker-entrypoint.sh /usr/local/bin/
 ---> 2793d27294e2
 Step 18/20 : ENTRYPOINT ["docker-entrypoint.sh"]
 ---> Running in 057accf923c3
 Removing intermediate container 057accf923c3
 ---> 39b58c0645c2
 Step 19/20 : EXPOSE 3306 33060
 ---> Running in e08e5b46adfc
 Removing intermediate container e08e5b46adfc
 ---> eed18bbc8cbd
 Step 20/20 : CMD ["mysqld"]
 ---> Running in a356b9dc7916
 Removing intermediate container a356b9dc7916
 ---> df723596f0a2
 Successfully built df723596f0a2
 Successfully tagged arm64uos/oracle-mysql:8.0

到此这篇关于构建aarch64环境Mysql8.0的Docker镜像的文章就介绍到这了,更多相关Mysql  Docker镜像内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • aarch64服务器部署mysql的流程分析

    目录 aarch64服务器-部署mysql 1.创建工作目录 2.编写docker-compose.yaml 3.编写数据库配置文件. 4.启动 5.测试 一. 创建用户 二. 授权: 三. 授权: aarch64服务器-部署mysql aarch64服务器-部署nacos 1.创建工作目录 mkdir -p /apps/mysql/{mydir,datadir,conf,source} 2.编写docker-compose.yaml version: '3' services: mysql:

  • 关于构建aarch64环境Mysql8.0的Docker镜像问题

    目录 1. 获取构建mysql镜像的脚本 2.预先下载gosu-arm64.gosu-arm64.asc ,并放到mysql/8.0目录下 3.修改Dockerfile.oracle,使用本地下载的gosu 4.执行构建Docker镜像 1. 获取构建mysql镜像的脚本 git clone https://github.com/docker-library/mysql.git 2.预先下载gosu-arm64.gosu-arm64.asc ,并放到mysql/8.0目录下 wget -c ht

  • Docker版的MySQL5.7升级到MySQL8.0.13,数据迁移

    1.备份旧的MySQL5.7的数据 记得首先要备份旧的数据,防止升级失败导致数据丢失.备份的方式有两种,一种是在宿主机直接执行导出命令,另外一种是先进入Docker环境下进行操作.主要的导出命令如下: #方式一,直接在宿主机器进行数据备份 # 0df568 是docker的id ;-uroot -p123456 是用户名和密码;dbA dbB是要备份的数据,--databases 后面可以接多个数据库名,导出的sql到/root/all-databases3306.sql docker exec

  • Docker安装MySQL8.0的实现方法

    环境:MacOS_Cetalina_10.15.1.Mysql8.0.18.Docker_2.0.0.3 1.docker仓库搜索mysql docker search mysql 2.docker仓库拉取mysql8.0 docker pull mysql:8.0 备注: docker pull mysql //默认拉取最新版本 3.查看本地仓库镜像是否下载成功 docker images mysql:8.0 4.安装运行mysql8.0容器 docker run -p 3307:3306 -

  • 使用GoogleContainerTools容器化jib构建docker镜像

    目录 前言碎语 插件配置 配置详解 插件命令使用 集成插件生命周期 文末结语 前言碎语 今天分享一个在容器化过程中非常重要的一个工具,java应用docker镜像build工具jib,这个工具是谷歌团队研发开源的,特点是不依赖docker守护进程,直白点说就是本地环境不安装docker环境也可以打包docker镜像.不用依赖维护Dockerfile,而且基于java打包插件可以轻松嵌入到java本身的构建生命周期中(本文使用maven).可以说是java容器化构建利器. 插件配置 <plugin

  • docker镜像管理命令详解

    目录 一.国内Docker镜像仓库 三.搜索镜像 四.拉取镜像 五.列出镜像 六.虚悬镜像 七.删除本地镜像 八.镜像的导入导出 导入方式一(不输出详细信息): 导入方式二(输出详细信息): 一.国内Docker镜像仓库 由于大家都知道的原因,从国外的docker 仓库中pull镜像的下载速度实际上是很慢的.国内的一些一线厂商以及docker官方都在国内免费提供了一些docker镜像仓库,使用国内的镜像仓库下载速度会有很大的提升.例如: Docker 官方提供的中国 registry mirro

  • docker灵活的构建PHP环境的实现

    使用docker搭建灵活的线上php环境 有时候你可能不太需要一些别人已经集成了的包或者镜像 我们就可以使用以下方式自己动手逐一构建自己所需要的环境结构 并在最后实现一键自动化部署 一步一步点亮docker技能树 ## . ## ## ## == ## ## ## ## ## === /""""""""""""""""".__/ ===

  • Docker 部署 Mysql8.0的方法示例

    1. 参照官网,安装docker 2.拉取mysql镜像 (默认拉取最新的镜像)8.0.11 docker pull mysql 3.在宿主机创建持久化 mysql data 及mysql.cnf mkdir /usr/local/mysqlData/test/cnf mkdir /usr/local/mysqlData/test/data vi /usr/loal/mysqlData/test/cnf/mysql.cnf 设置本地文件共享: Docker -> Preferences... -

  • 详解使用 Docker 构建 LNMP 环境

    配置简单的 LNMP 环境 这里使用 docker-compose 的方式,配置内容如下: docker-compose.yml version: "2" services: # Nginx 1.11.10: https://hub.docker.com/_/nginx/ web: image: nginx:1.11.10 ports: # 将主机的 8080 端口映射到容器的 80 端口 - 8080:80 depends_on: - php # 同 php 一起共享 ./apps

  • 解决Windows环境下安装 mysql-8.0.11-winx64 遇到的问题

    下载mysql安装包,我的是下载mysql-8.0.11-winx64,解压到你想安装的目录下,然后配置环境(window环境下,mac本还没试过), 1.首先,配置环境:右击此电脑->属性->高级系统设置->环境变量->path->新建 ,然后将自己的路径添加进去(例如我目录:F:\mysql\mysql-8.0.11-winx64),除此之外还要看解压的压缩包内是否有my.ini文件或者my-default.ini文件,如果没有需要自己写一个在根目录下,默认的配置信息如下

  • CentOS8部署LNMP环境之编译安装mysql8.0.29的教程详解

    一.前提 由于我安装了几次,我就不再讲述报错了,有点打脑壳!!!提前把相关依赖和报错就地解决. 1.所需源码包 mysql-8.0.19.tar.gz boost_1_70_0.tar.gz //安装mysql-8所需要的boost版本 rpcsvc-proto-1.4.tar.gz //后面出错所需要的源码包 mysql-8.0.19下载地址:http://mirrors.sohu.com/mysql/ boost_1_70_0下载地址:https://dl.bintray.com/boost

随机推荐