docker images的常用方式

 更新时间:2023年11月23日 09:49:15   作者:petrel2015  
这篇文章主要介绍了docker images的常用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教

docker images常用方式

docker images有三个可选参数

-f代表过滤器(–filter),后面可以接一些条件

具体参考https://docs.docker.com/engine/reference/commandline/images/

  • -q代表只输出镜像id–quiet)
  • -a代表所有镜像但是会隐藏中间镜像,可以通过以下命令查看(docker image history <IMAGE_ID> )

docker image 是啥?

A container image is a tarfile containing tar files.
Each of the tar file is a layer.
Once all tar files have been extract into the same location then you have the container’s filesystem.

容器镜像就是一个 tar 文件集合。

每一个 tar 文件就是一层。

以 MySQL5.7 的镜像为例探析

docker pull 拉取镜像

root@aliyun:~# docker pull mysql:5.7
5.7: Pulling from library/mysql
bb79b6b2107f: Pull complete #1
49e22f6fb9f7: Pull complete #2
842b1255668c: Pull complete #3
9f48d1f43000: Pull complete #4
c693f0615bce: Pull complete #5
8a621b9dbed2: Pull complete #6
0807d32aef13: Pull complete #7
f15d42f48bd9: Pull complete #8
098ceecc0c8d: Pull complete #9
b6fead9737bc: Pull complete #10
351d223d3d76: Pull complete #11
Digest: sha256:4d2b34e99c14edb99cdd95ddad4d9aa7ea3f2c4405ff0c3509a29dc40bcb10ef
Status: Downloaded newer image for mysql:5.7
docker.io/library/mysql:5.7

docker images 查看镜像

root@aliyun:~# docker images
REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
mysql                    5.7                 1b12f2e9257b        8 days ago          448MB

镜像探析

docker save 保存镜像为一个 tar 文件

root@aliyun:~# docker save  mysql:5.7 > mysql57.tar
root@aliyun:~# ls
mysql57.tar

tar -xvf mysql57.tar 解压

root@aliyun:~# mkdir mysql57
root@aliyun:~# mv mysql57.tar mysql57
root@aliyun:~# cd mysql57/
root@aliyun:mysql57# tar -xvf mysql57.tar 
1b12f2e9257be96da5c075f186dc371b18442b0f9281728ac64c9a69c6e0e264.json
1fce65acd43ca19d06b4e19b60f1ace8985636b6ec8f724bbd84fafba755ed76/
1fce65acd43ca19d06b4e19b60f1ace8985636b6ec8f724bbd84fafba755ed76/VERSION
1fce65acd43ca19d06b4e19b60f1ace8985636b6ec8f724bbd84fafba755ed76/json
1fce65acd43ca19d06b4e19b60f1ace8985636b6ec8f724bbd84fafba755ed76/layer.tar #1
304ee2cbc7cc2c76cf3a8565eedf55f8c3e4b21c8e29086b07766b215243ebc6/
304ee2cbc7cc2c76cf3a8565eedf55f8c3e4b21c8e29086b07766b215243ebc6/VERSION 
304ee2cbc7cc2c76cf3a8565eedf55f8c3e4b21c8e29086b07766b215243ebc6/json
304ee2cbc7cc2c76cf3a8565eedf55f8c3e4b21c8e29086b07766b215243ebc6/layer.tar #2
64be71905d72355dccfef94aba2b47b05380ea93773168b138a3caed57a5e2c6/
64be71905d72355dccfef94aba2b47b05380ea93773168b138a3caed57a5e2c6/VERSION
64be71905d72355dccfef94aba2b47b05380ea93773168b138a3caed57a5e2c6/json
64be71905d72355dccfef94aba2b47b05380ea93773168b138a3caed57a5e2c6/layer.tar #3
6a2d1075146226fca0ba523ae41981a1e9a34f85e9267ba415749311142afcd2/
6a2d1075146226fca0ba523ae41981a1e9a34f85e9267ba415749311142afcd2/VERSION
6a2d1075146226fca0ba523ae41981a1e9a34f85e9267ba415749311142afcd2/json
6a2d1075146226fca0ba523ae41981a1e9a34f85e9267ba415749311142afcd2/layer.tar #4
6edec20f2d3574685f1f03fc785eb2b6d1c9b617f8edfee6fa5e85122e179fde/
6edec20f2d3574685f1f03fc785eb2b6d1c9b617f8edfee6fa5e85122e179fde/VERSION
6edec20f2d3574685f1f03fc785eb2b6d1c9b617f8edfee6fa5e85122e179fde/json
6edec20f2d3574685f1f03fc785eb2b6d1c9b617f8edfee6fa5e85122e179fde/layer.tar #5
9e505083f6d3afcda0b321cbde15f65599d9e4ba8eeb18d9af8fa03ef0c98578/
9e505083f6d3afcda0b321cbde15f65599d9e4ba8eeb18d9af8fa03ef0c98578/VERSION
9e505083f6d3afcda0b321cbde15f65599d9e4ba8eeb18d9af8fa03ef0c98578/json
9e505083f6d3afcda0b321cbde15f65599d9e4ba8eeb18d9af8fa03ef0c98578/layer.tar #6
a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c/
a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c/VERSION
a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c/json
a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c/layer.tar #7
ba50e18552223f50cc513951c1a6da0ec20862a35124dd096a4b4fc237a09a00/
ba50e18552223f50cc513951c1a6da0ec20862a35124dd096a4b4fc237a09a00/VERSION
ba50e18552223f50cc513951c1a6da0ec20862a35124dd096a4b4fc237a09a00/json
ba50e18552223f50cc513951c1a6da0ec20862a35124dd096a4b4fc237a09a00/layer.tar #8
c8fc6976df4a82dc84e5002ed6ec0a5b0c61590f5b9bf27b9cd3b90311ad7cc0/
c8fc6976df4a82dc84e5002ed6ec0a5b0c61590f5b9bf27b9cd3b90311ad7cc0/VERSION
c8fc6976df4a82dc84e5002ed6ec0a5b0c61590f5b9bf27b9cd3b90311ad7cc0/json
c8fc6976df4a82dc84e5002ed6ec0a5b0c61590f5b9bf27b9cd3b90311ad7cc0/layer.tar #9
ced4e2ca012a214a2bf1db8f94c3c75035470b0938881f43ea63f0494f72960e/
ced4e2ca012a214a2bf1db8f94c3c75035470b0938881f43ea63f0494f72960e/VERSION
ced4e2ca012a214a2bf1db8f94c3c75035470b0938881f43ea63f0494f72960e/json
ced4e2ca012a214a2bf1db8f94c3c75035470b0938881f43ea63f0494f72960e/layer.tar #10 
eb5e2ed3d16ea4cbd50b9006ff834e429bc6c06111905d1e4440476edf796477/
eb5e2ed3d16ea4cbd50b9006ff834e429bc6c06111905d1e4440476edf796477/VERSION
eb5e2ed3d16ea4cbd50b9006ff834e429bc6c06111905d1e4440476edf796477/json
eb5e2ed3d16ea4cbd50b9006ff834e429bc6c06111905d1e4440476edf796477/layer.tar #11
manifest.json
repositories

可以看到解压后的 mysql57.tar 一共有 11 个 layer.tar, 也就和 docker pull mysql:5.7 输出的信息也有 11 层保持一致。

tree 查看文件层级结构

root@aliyun:mysql57# tree .
.
├── 1b12f2e9257be96da5c075f186dc371b18442b0f9281728ac64c9a69c6e0e264.json #配置文件
├── 1fce65acd43ca19d06b4e19b60f1ace8985636b6ec8f724bbd84fafba755ed76 #1
│   ├── VERSION
│   ├── json
│   └── layer.tar 
├── 304ee2cbc7cc2c76cf3a8565eedf55f8c3e4b21c8e29086b07766b215243ebc6 #2
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── 64be71905d72355dccfef94aba2b47b05380ea93773168b138a3caed57a5e2c6 #3
│   ├── VERSION 
│   ├── json
│   └── layer.tar
├── 6a2d1075146226fca0ba523ae41981a1e9a34f85e9267ba415749311142afcd2 #4
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── 6edec20f2d3574685f1f03fc785eb2b6d1c9b617f8edfee6fa5e85122e179fde #5
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── 9e505083f6d3afcda0b321cbde15f65599d9e4ba8eeb18d9af8fa03ef0c98578 #6
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c #7
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── ba50e18552223f50cc513951c1a6da0ec20862a35124dd096a4b4fc237a09a00 #8
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── c8fc6976df4a82dc84e5002ed6ec0a5b0c61590f5b9bf27b9cd3b90311ad7cc0 #9
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── ced4e2ca012a214a2bf1db8f94c3c75035470b0938881f43ea63f0494f72960e #10
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── eb5e2ed3d16ea4cbd50b9006ff834e429bc6c06111905d1e4440476edf796477 #11
│   ├── VERSION
│   ├── json
│   └── layer.tar
├── manifest.json # 清单
├── mysql57.tar  # mysql:5.7 这个 image 保存的 tar 文件
└── repositories # mysql:5.7 这个 image 信息

11 directories, 37 files

cat repositories 查看 mysql:5.7 镜像信息

root@aliyun:mysql57# cat repositories 
{"mysql":{"5.7":"304ee2cbc7cc2c76cf3a8565eedf55f8c3e4b21c8e29086b07766b215243ebc6"}}

cat minifest.json

root@aliyun:mysql57# cat manifest.json 
[{"Config":"1b12f2e9257be96da5c075f186dc371b18442b0f9281728ac64c9a69c6e0e264.json","RepoTags":["mysql:5.7"],"Layers":["a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c/layer.tar","1fce65acd43ca19d06b4e19b60f1ace8985636b6ec8f724bbd84fafba755ed76/layer.tar","9e505083f6d3afcda0b321cbde15f65599d9e4ba8eeb18d9af8fa03ef0c98578/layer.tar","ba50e18552223f50cc513951c1a6da0ec20862a35124dd096a4b4fc237a09a00/layer.tar","eb5e2ed3d16ea4cbd50b9006ff834e429bc6c06111905d1e4440476edf796477/layer.tar","6edec20f2d3574685f1f03fc785eb2b6d1c9b617f8edfee6fa5e85122e179fde/layer.tar","64be71905d72355dccfef94aba2b47b05380ea93773168b138a3caed57a5e2c6/layer.tar","ced4e2ca012a214a2bf1db8f94c3c75035470b0938881f43ea63f0494f72960e/layer.tar","6a2d1075146226fca0ba523ae41981a1e9a34f85e9267ba415749311142afcd2/layer.tar","c8fc6976df4a82dc84e5002ed6ec0a5b0c61590f5b9bf27b9cd3b90311ad7cc0/layer.tar","304ee2cbc7cc2c76cf3a8565eedf55f8c3e4b21c8e29086b07766b215243ebc6/layer.tar"]}]

可以看到 manifest.json 中包括三个部分:Config,RepoTags,Layers。

Layers 是 构成 images 所有层。每一层按顺序放置。

a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c/layer.tar 是第一层,以此类推。mysql:5.7 这个 image 总共 11 层。

选择一个 layer 进行解压

root@aliyun:a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c# tar -xvf layer.tar
root@aliyun:a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c# ls
VERSION  boot  etc   json       lib    media  opt   root  sbin  sys  usr
bin      dev   home  layer.tar  lib64  mnt    proc  run   srv   tmp  var

可以看到 a4764bb62dbda157c66840918cf1409771ae7090432b20ced39fbf6d7c86cd0c 这一层的 layer.tar 解压之后就是一个 Linux 的文件系统。其他的 layer 类似。

创建镜像

docker import 创建一个空镜像

root@aliyun:~# tar cv --files-from /dev/null | docker import - empty:v1
sha256:a149ced6d49f4030e21777ba97e4d6129bf60477acf6c2ab53124b70c231e84f
root@aliyun:~# docker images
REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
empty                    v1                  a149ced6d49f        5 seconds ago       0B

可以看到 empty 这个镜像是 0Bytes。

docker build 创建镜像

通过 Dockerfile 创建。

用官方提供的 MySQL5.7 Dockerfile 和 docker-entrypoint.sh创建 一个 mysql5.7像。

$ mkdir mysql5.7
$ cd mysql5.7/
$ wget https://raw.githubusercontent.com/docker-library/mysql/master/5.7/Dockerfile
--2020-10-31 02:49:18--  https://raw.githubusercontent.com/docker-library/mysql/master/5.7/Dockerfile
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4144 (4.0K) [text/plain]
Saving to: ‘Dockerfile'

Dockerfile                      100%[=======================================================>]   4.05K  --.-KB/s    in 0s

2020-10-31 02:49:18 (10.8 MB/s) - ‘Dockerfile' saved [4144/4144]

$ wget https://raw.githubusercontent.com/docker-library/mysql/master/5.7/docker-entrypoint.sh
--2020-10-31 02:49:28--  https://raw.githubusercontent.com/docker-library/mysql/master/5.7/docker-entrypoint.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13116 (13K) [text/plain]
Saving to: ‘docker-entrypoint.sh'

docker-entrypoint.sh            100%[=======================================================>]  12.81K  --.-KB/s    in 0.001s

2020-10-31 02:49:28 (19.6 MB/s) - ‘docker-entrypoint.sh' saved [13116/13116]

$ cd ..
$ docker build -f mysql5.7/Dockerfile -t mysql5.7.0 mysql5.7/
Sending build context to Docker daemon  19.97kB
Step 1/18 : FROM debian:buster-slim
buster-slim: Pulling from library/debian
bb79b6b2107f: Pull complete
Digest: sha256:1be41347adaee8303bf12114b9edf4af0b35a5e1d9756b3ddad59856eaa31ea7
Status: Downloaded newer image for debian:buster-slim
 ---> f49666103347
Step 2/18 : RUN groupadd -r mysql && useradd -r -g mysql mysql
 ---> Running in 33aad4861bd7
Removing intermediate container 33aad4861bd7
 ---> a6ed693e99af
Step 3/18 : RUN apt-get update && apt-get install -y --no-install-recommends gnupg dirmngr && rm -rf /var/lib/apt/lists/*
 ---> Running in 20af82eb3c92
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [243 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7856 B]
Fetched 8396 kB in 2s (3871 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf
  gpgsm libassuan0 libksba8 libldap-2.4-2 libldap-common libnpth0 libreadline7
  libsasl2-2 libsasl2-modules-db libsqlite3-0 lsb-base pinentry-curses
  readline-common
Suggested packages:
  dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage
  scdaemon pinentry-doc readline-doc
Recommended packages:
  libsasl2-modules
The following NEW packages will be installed:
  dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
  gpg-wks-server gpgconf gpgsm libassuan0 libksba8 libldap-2.4-2
  libldap-common libnpth0 libreadline7 libsasl2-2 libsasl2-modules-db
  libsqlite3-0 lsb-base pinentry-curses readline-common
0 upgraded, 22 newly installed, 0 to remove and 1 not upgraded.
Need to get 8470 kB of archives.
After this operation, 17.7 MB of additional disk space will be used.
Get:1 http://security.debian.org/debian-security buster/updates/main amd64 libldap-common all 2.4.47+dfsg-3+deb10u3 [89.7 kB]
Get:2 http://security.debian.org/debian-security buster/updates/main amd64 libldap-2.4-2 amd64 2.4.47+dfsg-3+deb10u3 [225 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 readline-common all 7.0-5 [70.6 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg-1+deb10u1 [69.1 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 libsasl2-2 amd64 2.1.27+dfsg-1+deb10u1 [106 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 libassuan0 amd64 2.5.2-1 [49.4 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 libreadline7 amd64 7.0-5 [151 kB]
Get:8 http://deb.debian.org/debian buster/main amd64 gpgconf amd64 2.2.12-1+deb10u1 [510 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 lsb-base all 10.2019051400 [28.4 kB]
Get:10 http://deb.debian.org/debian buster/main amd64 libksba8 amd64 1.3.5-2 [99.7 kB]
Get:11 http://deb.debian.org/debian buster/main amd64 libnpth0 amd64 1.6-1 [18.4 kB]
Get:12 http://deb.debian.org/debian buster/main amd64 dirmngr amd64 2.2.12-1+deb10u1 [712 kB]
Get:13 http://deb.debian.org/debian buster/main amd64 gnupg-l10n all 2.2.12-1+deb10u1 [1010 kB]
Get:14 http://deb.debian.org/debian buster/main amd64 gnupg-utils amd64 2.2.12-1+deb10u1 [861 kB]
Get:15 http://deb.debian.org/debian buster/main amd64 libsqlite3-0 amd64 3.27.2-3 [641 kB]
Get:16 http://deb.debian.org/debian buster/main amd64 gpg amd64 2.2.12-1+deb10u1 [865 kB]
Get:17 http://deb.debian.org/debian buster/main amd64 pinentry-curses amd64 1.1.0-2 [64.5 kB]
Get:18 http://deb.debian.org/debian buster/main amd64 gpg-agent amd64 2.2.12-1+deb10u1 [617 kB]
Get:19 http://deb.debian.org/debian buster/main amd64 gpg-wks-client amd64 2.2.12-1+deb10u1 [485 kB]
Get:20 http://deb.debian.org/debian buster/main amd64 gpg-wks-server amd64 2.2.12-1+deb10u1 [478 kB]
Get:21 http://deb.debian.org/debian buster/main amd64 gpgsm amd64 2.2.12-1+deb10u1 [604 kB]
Get:22 http://deb.debian.org/debian buster/main amd64 gnupg all 2.2.12-1+deb10u1 [715 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 8470 kB in 0s (29.8 MB/s)
Selecting previously unselected package readline-common.
(Reading database ... 6460 files and directories currently installed.)
Preparing to unpack .../00-readline-common_7.0-5_all.deb ...
Unpacking readline-common (7.0-5) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../01-libsasl2-modules-db_2.1.27+dfsg-1+deb10u1_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg-1+deb10u1) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../02-libsasl2-2_2.1.27+dfsg-1+deb10u1_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27+dfsg-1+deb10u1) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../03-libldap-common_2.4.47+dfsg-3+deb10u3_all.deb ...
Unpacking libldap-common (2.4.47+dfsg-3+deb10u3) ...
Selecting previously unselected package libldap-2.4-2:amd64.
Preparing to unpack .../04-libldap-2.4-2_2.4.47+dfsg-3+deb10u3_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.47+dfsg-3+deb10u3) ...
Selecting previously unselected package libassuan0:amd64.
Preparing to unpack .../05-libassuan0_2.5.2-1_amd64.deb ...
Unpacking libassuan0:amd64 (2.5.2-1) ...
Selecting previously unselected package libreadline7:amd64.
Preparing to unpack .../06-libreadline7_7.0-5_amd64.deb ...
Unpacking libreadline7:amd64 (7.0-5) ...
Selecting previously unselected package gpgconf.
Preparing to unpack .../07-gpgconf_2.2.12-1+deb10u1_amd64.deb ...
Unpacking gpgconf (2.2.12-1+deb10u1) ...
Selecting previously unselected package lsb-base.
Preparing to unpack .../08-lsb-base_10.2019051400_all.deb ...
Unpacking lsb-base (10.2019051400) ...
Selecting previously unselected package libksba8:amd64.
Preparing to unpack .../09-libksba8_1.3.5-2_amd64.deb ...
Unpacking libksba8:amd64 (1.3.5-2) ...
Selecting previously unselected package libnpth0:amd64.
Preparing to unpack .../10-libnpth0_1.6-1_amd64.deb ...
Unpacking libnpth0:amd64 (1.6-1) ...
Selecting previously unselected package dirmngr.
Preparing to unpack .../11-dirmngr_2.2.12-1+deb10u1_amd64.deb ...
Unpacking dirmngr (2.2.12-1+deb10u1) ...
Selecting previously unselected package gnupg-l10n.
Preparing to unpack .../12-gnupg-l10n_2.2.12-1+deb10u1_all.deb ...
Unpacking gnupg-l10n (2.2.12-1+deb10u1) ...
Selecting previously unselected package gnupg-utils.
Preparing to unpack .../13-gnupg-utils_2.2.12-1+deb10u1_amd64.deb ...
Unpacking gnupg-utils (2.2.12-1+deb10u1) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack .../14-libsqlite3-0_3.27.2-3_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.27.2-3) ...
Selecting previously unselected package gpg.
Preparing to unpack .../15-gpg_2.2.12-1+deb10u1_amd64.deb ...
Unpacking gpg (2.2.12-1+deb10u1) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../16-pinentry-curses_1.1.0-2_amd64.deb ...
Unpacking pinentry-curses (1.1.0-2) ...
Selecting previously unselected package gpg-agent.
Preparing to unpack .../17-gpg-agent_2.2.12-1+deb10u1_amd64.deb ...
Unpacking gpg-agent (2.2.12-1+deb10u1) ...
Selecting previously unselected package gpg-wks-client.
Preparing to unpack .../18-gpg-wks-client_2.2.12-1+deb10u1_amd64.deb ...
Unpacking gpg-wks-client (2.2.12-1+deb10u1) ...
Selecting previously unselected package gpg-wks-server.
Preparing to unpack .../19-gpg-wks-server_2.2.12-1+deb10u1_amd64.deb ...
Unpacking gpg-wks-server (2.2.12-1+deb10u1) ...
Selecting previously unselected package gpgsm.
Preparing to unpack .../20-gpgsm_2.2.12-1+deb10u1_amd64.deb ...
Unpacking gpgsm (2.2.12-1+deb10u1) ...
Selecting previously unselected package gnupg.
Preparing to unpack .../21-gnupg_2.2.12-1+deb10u1_all.deb ...
Unpacking gnupg (2.2.12-1+deb10u1) ...
Setting up libksba8:amd64 (1.3.5-2) ...
Setting up lsb-base (10.2019051400) ...
Setting up libsqlite3-0:amd64 (3.27.2-3) ...
Setting up libnpth0:amd64 (1.6-1) ...
Setting up libassuan0:amd64 (2.5.2-1) ...
Setting up libldap-common (2.4.47+dfsg-3+deb10u3) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-1+deb10u1) ...
Setting up gnupg-l10n (2.2.12-1+deb10u1) ...
Setting up libsasl2-2:amd64 (2.1.27+dfsg-1+deb10u1) ...
Setting up readline-common (7.0-5) ...
Setting up libreadline7:amd64 (7.0-5) ...
Setting up gnupg-utils (2.2.12-1+deb10u1) ...
Setting up pinentry-curses (1.1.0-2) ...
Setting up libldap-2.4-2:amd64 (2.4.47+dfsg-3+deb10u3) ...
Setting up gpgconf (2.2.12-1+deb10u1) ...
Setting up gpg (2.2.12-1+deb10u1) ...
Setting up gpg-agent (2.2.12-1+deb10u1) ...
Setting up gpgsm (2.2.12-1+deb10u1) ...
Setting up dirmngr (2.2.12-1+deb10u1) ...
Setting up gpg-wks-server (2.2.12-1+deb10u1) ...
Setting up gpg-wks-client (2.2.12-1+deb10u1) ...
Setting up gnupg (2.2.12-1+deb10u1) ...
Processing triggers for libc-bin (2.28-10) ...
Removing intermediate container 20af82eb3c92
 ---> 94fa5bdaa7a1
Step 4/18 : ENV GOSU_VERSION 1.12
 ---> Running in 321cd8e67bad
Removing intermediate container 321cd8e67bad
 ---> b6c0be83220d
Step 5/18 : RUN set -eux;       savedAptMark="$(apt-mark showmanual)";  apt-get update;         apt-get install -y --no-install-recommends ca-certificates wget;        rm -rf /var/lib/apt/lists/*;    dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')";      wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch";   wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc";     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;       gpgconf --kill all;     rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc;    apt-mark auto '.*' > /dev/null;         [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null;    apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false;   chmod +x /usr/local/bin/gosu;   gosu --version;         gosu nobody true
 ---> Running in 973193ddac07
+ apt-mark showmanual
+ savedAptMark=dirmngr
gnupg
+ apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [243 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7856 B]
Fetched 8396 kB in 2s (3808 kB/s)
Reading package lists...
+ apt-get install -y --no-install-recommends ca-certificates wget
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libpcre2-8-0 libpsl5 libssl1.1 openssl
Recommended packages:
  publicsuffix
The following NEW packages will be installed:
  ca-certificates libpcre2-8-0 libpsl5 libssl1.1 openssl wget
0 upgraded, 6 newly installed, 0 to remove and 1 not upgraded.
Need to get 3709 kB of archives.
After this operation, 10.1 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 libpcre2-8-0 amd64 10.32-5 [213 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 libpsl5 amd64 0.20.2-2 [53.7 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 wget amd64 1.20.1-1.1 [902 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 libssl1.1 amd64 1.1.1d-0+deb10u3 [1538 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 openssl amd64 1.1.1d-0+deb10u3 [844 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 ca-certificates all 20200601~deb10u1 [158 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 3709 kB in 0s (27.4 MB/s)
Selecting previously unselected package libpcre2-8-0:amd64.
(Reading database ... 6777 files and directories currently installed.)
Preparing to unpack .../0-libpcre2-8-0_10.32-5_amd64.deb ...
Unpacking libpcre2-8-0:amd64 (10.32-5) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../1-libpsl5_0.20.2-2_amd64.deb ...
Unpacking libpsl5:amd64 (0.20.2-2) ...
Selecting previously unselected package wget.
Preparing to unpack .../2-wget_1.20.1-1.1_amd64.deb ...
Unpacking wget (1.20.1-1.1) ...
Selecting previously unselected package libssl1.1:amd64.
Preparing to unpack .../3-libssl1.1_1.1.1d-0+deb10u3_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1d-0+deb10u3) ...
Selecting previously unselected package openssl.
Preparing to unpack .../4-openssl_1.1.1d-0+deb10u3_amd64.deb ...
Unpacking openssl (1.1.1d-0+deb10u3) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../5-ca-certificates_20200601~deb10u1_all.deb ...
Unpacking ca-certificates (20200601~deb10u1) ...
Setting up libpsl5:amd64 (0.20.2-2) ...
Setting up libssl1.1:amd64 (1.1.1d-0+deb10u3) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libpcre2-8-0:amd64 (10.32-5) ...
Setting up openssl (1.1.1d-0+deb10u3) ...
Setting up wget (1.20.1-1.1) ...
Setting up ca-certificates (20200601~deb10u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
126 added, 0 removed; done.
Processing triggers for libc-bin (2.28-10) ...
Processing triggers for ca-certificates (20200601~deb10u1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
+ rm -rf /var/lib/apt/lists/auxfiles /var/lib/apt/lists/deb.debian.org_debian_dists_buster-updates_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_buster-updates_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/deb.debian.org_debian_dists_buster_InRelease /var/lib/apt/lists/deb.debian.org_debian_dists_buster_main_binary-amd64_Packages.lz4 /var/lib/apt/lists/lock /var/lib/apt/lists/partial /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_InRelease /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_main_binary-amd64_Packages.lz4
+ dpkg --print-architecture
+ awk -F- { print $NF }
+ dpkgArch=amd64
+ wget -O /usr/local/bin/gosu https://github.com/tianon/gosu/releases/download/1.12/gosu-amd64
--2020-10-31 02:50:34--  https://github.com/tianon/gosu/releases/download/1.12/gosu-amd64
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/19708981/93269500-7f72-11ea-94c5-37b92917e2b5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201031%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201031T025035Z&X-Amz-Expires=300&X-Amz-Signature=b368f383b83c5fab527d981a2e9a4c8c80deb7cbf5cc3b1023dd93fd1b953d16&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=19708981&response-content-disposition=attachment%3B%20filename%3Dgosu-amd64&response-content-type=application%2Foctet-stream [following]
--2020-10-31 02:50:35--  https://github-production-release-asset-2e65be.s3.amazonaws.com/19708981/93269500-7f72-11ea-94c5-37b92917e2b5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201031%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201031T025035Z&X-Amz-Expires=300&X-Amz-Signature=b368f383b83c5fab527d981a2e9a4c8c80deb7cbf5cc3b1023dd93fd1b953d16&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=19708981&response-content-disposition=attachment%3B%20filename%3Dgosu-amd64&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.39.164
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.39.164|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2404352 (2.3M) [application/octet-stream]
Saving to: '/usr/local/bin/gosu'

     0K .......... .......... .......... .......... ..........  2%  305K 8s
    50K .......... .......... .......... .......... ..........  4% 34.4M 4s
   100K .......... .......... .......... .......... ..........  6%  605K 4s
   150K .......... .......... .......... .......... ..........  8% 31.9M 3s
   200K .......... .......... .......... .......... .......... 10%  624K 3s
   250K .......... .......... .......... .......... .......... 12% 21.8M 2s
   300K .......... .......... .......... .......... .......... 14% 28.0M 2s
   350K .......... .......... .......... .......... .......... 17% 31.8M 2s
   400K .......... .......... .......... .......... .......... 19% 13.2M 1s
   450K .......... .......... .......... .......... .......... 21%  686K 2s
   500K .......... .......... .......... .......... .......... 23% 11.8M 1s
   550K .......... .......... .......... .......... .......... 25% 18.5M 1s
   600K .......... .......... .......... .......... .......... 27% 18.4M 1s
   650K .......... .......... .......... .......... .......... 29% 18.4M 1s
   700K .......... .......... .......... .......... .......... 31% 20.2M 1s
   750K .......... .......... .......... .......... .......... 34% 19.8M 1s
   800K .......... .......... .......... .......... .......... 36% 19.8M 1s
   850K .......... .......... .......... .......... .......... 38% 24.6M 1s
   900K .......... .......... .......... .......... .......... 40%  828K 1s
   950K .......... .......... .......... .......... .......... 42% 28.9M 1s
  1000K .......... .......... .......... .......... .......... 44% 19.3M 1s
  1050K .......... .......... .......... .......... .......... 46% 25.3M 1s
  1100K .......... .......... .......... .......... .......... 48% 25.5M 1s
  1150K .......... .......... .......... .......... .......... 51% 25.8M 0s
  1200K .......... .......... .......... .......... .......... 53% 24.2M 0s
  1250K .......... .......... .......... .......... .......... 55% 25.5M 0s
  1300K .......... .......... .......... .......... .......... 57% 25.1M 0s
  1350K .......... .......... .......... .......... .......... 59% 24.7M 0s
  1400K .......... .......... .......... .......... .......... 61%  648K 0s
  1450K .......... .......... .......... .......... .......... 63% 21.3M 0s
  1500K .......... .......... .......... .......... .......... 66% 22.0M 0s
  1550K .......... .......... .......... .......... .......... 68% 21.1M 0s
  1600K .......... .......... .......... .......... .......... 70% 20.9M 0s
  1650K .......... .......... .......... .......... .......... 72% 22.7M 0s
  1700K .......... .......... .......... .......... .......... 74% 22.7M 0s
  1750K .......... .......... .......... .......... .......... 76% 26.9M 0s
  1800K .......... .......... .......... .......... .......... 78% 28.1M 0s
  1850K .......... .......... .......... .......... .......... 80% 27.1M 0s
  1900K .......... .......... .......... .......... .......... 83% 23.1M 0s
  1950K .......... .......... .......... .......... .......... 85% 26.1M 0s
  2000K .......... .......... .......... .......... .......... 87%  858K 0s
  2050K .......... .......... .......... .......... .......... 89% 30.4M 0s
  2100K .......... .......... .......... .......... .......... 91% 15.0M 0s
  2150K .......... .......... .......... .......... .......... 93% 19.3M 0s
  2200K .......... .......... .......... .......... .......... 95% 18.4M 0s
  2250K .......... .......... .......... .......... .......... 97% 19.1M 0s
  2300K .......... .......... .......... .......... ........  100% 20.9M=0.7s

2020-10-31 02:50:36 (3.35 MB/s) - '/usr/local/bin/gosu' saved [2404352/2404352]

+ wget -O /usr/local/bin/gosu.asc https://github.com/tianon/gosu/releases/download/1.12/gosu-amd64.asc
--2020-10-31 02:50:36--  https://github.com/tianon/gosu/releases/download/1.12/gosu-amd64.asc
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/19708981/9457c200-7f72-11ea-88bd-4667fa065c37?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201031%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201031T025036Z&X-Amz-Expires=300&X-Amz-Signature=9f30d12993338e8974102e9158e71472ef88836a72b225a44871da2c0d2d4dee&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=19708981&response-content-disposition=attachment%3B%20filename%3Dgosu-amd64.asc&response-content-type=application%2Foctet-stream [following]
--2020-10-31 02:50:36--  https://github-production-release-asset-2e65be.s3.amazonaws.com/19708981/9457c200-7f72-11ea-88bd-4667fa065c37?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201031%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201031T025036Z&X-Amz-Expires=300&X-Amz-Signature=9f30d12993338e8974102e9158e71472ef88836a72b225a44871da2c0d2d4dee&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=19708981&response-content-disposition=attachment%3B%20filename%3Dgosu-amd64.asc&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.81.248
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.81.248|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 566 [application/octet-stream]
Saving to: '/usr/local/bin/gosu.asc'

     0K                                                       100% 5.20M=0s

2020-10-31 02:50:37 (5.20 MB/s) - '/usr/local/bin/gosu.asc' saved [566/566]

+ mktemp -d
+ export GNUPGHOME=/tmp/tmp.eByQGZUCe2
+ gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
gpg: keybox '/tmp/tmp.eByQGZUCe2/pubring.kbx' created
gpg: /tmp/tmp.eByQGZUCe2/trustdb.gpg: trustdb created
gpg: key 036A9C25BF357DD4: public key "Tianon Gravi <tianon@tianon.xyz>" imported
gpg: Total number processed: 1
gpg:               imported: 1
+ gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu
gpg: Signature made Thu Apr 16 06:40:32 2020 UTC
gpg:                using RSA key B42F6819007F00F88E364FD4036A9C25BF357DD4
gpg: Good signature from "Tianon Gravi <tianon@tianon.xyz>" [unknown]
gpg:                 aka "Andrew Page (Tianon Gravi) <admwiggin@gmail.com>" [unknown]
gpg:                 aka "Tianon Gravi (Andrew Page) <tianon@infosiftr.com>" [unknown]
gpg:                 aka "Tianon Gravi <tianon@debian.org>" [unknown]
gpg:                 aka "Tianon Gravi <tianon@dockerproject.org>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: B42F 6819 007F 00F8 8E36  4FD4 036A 9C25 BF35 7DD4
+ gpgconf --kill all
+ rm -rf /tmp/tmp.eByQGZUCe2 /usr/local/bin/gosu.asc
+ apt-mark auto .*
+ [ -z dirmngr
gnupg ]
+ apt-mark manual dirmngr gnupg
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  ca-certificates* libpcre2-8-0* libpsl5* libssl1.1* openssl* wget*
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 10.1 MB disk space will be freed.
(Reading database ... 7157 files and directories currently installed.)
Removing ca-certificates (20200601~deb10u1) ...
Removing dangling symlinks from /etc/ssl/certs... done.
Removing wget (1.20.1-1.1) ...
Removing libpcre2-8-0:amd64 (10.32-5) ...
Removing libpsl5:amd64 (0.20.2-2) ...
Removing openssl (1.1.1d-0+deb10u3) ...
Removing libssl1.1:amd64 (1.1.1d-0+deb10u3) ...
Processing triggers for libc-bin (2.28-10) ...
(Reading database ... 6781 files and directories currently installed.)
Purging configuration files for wget (1.20.1-1.1) ...
Purging configuration files for libssl1.1:amd64 (1.1.1d-0+deb10u3) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Purging configuration files for ca-certificates (20200601~deb10u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Removing dangling symlinks from /etc/ssl/certs... done.
Purging configuration files for openssl (1.1.1d-0+deb10u3) ...
+ chmod +x /usr/local/bin/gosu
+ gosu --version
1.12 (go1.13.10 on linux/amd64; gc)
+ gosu nobody true
Removing intermediate container 973193ddac07
 ---> 449afac04e2c
Step 6/18 : RUN mkdir /docker-entrypoint-initdb.d
 ---> Running in ff6cd2b7a3c3
Removing intermediate container ff6cd2b7a3c3
 ---> a07f6120851f
Step 7/18 : RUN apt-get update && apt-get install -y --no-install-recommends            pwgen           openssl                perl             xz-utils        && rm -rf /var/lib/apt/lists/*
 ---> Running in 0e68a1deb11b
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [243 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7856 B]
Fetched 8396 kB in 2s (3567 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libgdbm-compat4 libgdbm6 libperl5.28 libssl1.1 perl-modules-5.28
Suggested packages:
  gdbm-l10n sensible-utils ca-certificates perl-doc libterm-readline-gnu-perl
  | libterm-readline-perl-perl make libb-debug-perl liblocale-codes-perl
Recommended packages:
  netbase
The following NEW packages will be installed:
  libgdbm-compat4 libgdbm6 libperl5.28 libssl1.1 openssl perl
  perl-modules-5.28 pwgen xz-utils
0 upgraded, 9 newly installed, 0 to remove and 1 not upgraded.
Need to get 9666 kB of archives.
After this operation, 53.2 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 perl-modules-5.28 all 5.28.1-6+deb10u1 [2873 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 libgdbm6 amd64 1.18.1-4 [64.7 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 libgdbm-compat4 amd64 1.18.1-4 [44.1 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 libperl5.28 amd64 5.28.1-6+deb10u1 [3894 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 perl amd64 5.28.1-6+deb10u1 [204 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 xz-utils amd64 5.2.4-1 [183 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 libssl1.1 amd64 1.1.1d-0+deb10u3 [1538 kB]
Get:8 http://deb.debian.org/debian buster/main amd64 openssl amd64 1.1.1d-0+deb10u3 [844 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 pwgen amd64 2.08-1 [19.5 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 9666 kB in 0s (38.8 MB/s)
Selecting previously unselected package perl-modules-5.28.
(Reading database ... 6777 files and directories currently installed.)
Preparing to unpack .../0-perl-modules-5.28_5.28.1-6+deb10u1_all.deb ...
Unpacking perl-modules-5.28 (5.28.1-6+deb10u1) ...
Selecting previously unselected package libgdbm6:amd64.
Preparing to unpack .../1-libgdbm6_1.18.1-4_amd64.deb ...
Unpacking libgdbm6:amd64 (1.18.1-4) ...
Selecting previously unselected package libgdbm-compat4:amd64.
Preparing to unpack .../2-libgdbm-compat4_1.18.1-4_amd64.deb ...
Unpacking libgdbm-compat4:amd64 (1.18.1-4) ...
Selecting previously unselected package libperl5.28:amd64.
Preparing to unpack .../3-libperl5.28_5.28.1-6+deb10u1_amd64.deb ...
Unpacking libperl5.28:amd64 (5.28.1-6+deb10u1) ...
Selecting previously unselected package perl.
Preparing to unpack .../4-perl_5.28.1-6+deb10u1_amd64.deb ...
Unpacking perl (5.28.1-6+deb10u1) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../5-xz-utils_5.2.4-1_amd64.deb ...
Unpacking xz-utils (5.2.4-1) ...
Selecting previously unselected package libssl1.1:amd64.
Preparing to unpack .../6-libssl1.1_1.1.1d-0+deb10u3_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1d-0+deb10u3) ...
Selecting previously unselected package openssl.
Preparing to unpack .../7-openssl_1.1.1d-0+deb10u3_amd64.deb ...
Unpacking openssl (1.1.1d-0+deb10u3) ...
Selecting previously unselected package pwgen.
Preparing to unpack .../8-pwgen_2.08-1_amd64.deb ...
Unpacking pwgen (2.08-1) ...
Setting up perl-modules-5.28 (5.28.1-6+deb10u1) ...
Setting up libssl1.1:amd64 (1.1.1d-0+deb10u3) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Setting up xz-utils (5.2.4-1) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist
Setting up openssl (1.1.1d-0+deb10u3) ...
Setting up pwgen (2.08-1) ...
Setting up libgdbm6:amd64 (1.18.1-4) ...
Setting up libgdbm-compat4:amd64 (1.18.1-4) ...
Setting up libperl5.28:amd64 (5.28.1-6+deb10u1) ...
Setting up perl (5.28.1-6+deb10u1) ...
Processing triggers for libc-bin (2.28-10) ...
Removing intermediate container 0e68a1deb11b
 ---> 25bd10825042
Step 8/18 : RUN set -ex;        key='A4A9406876FCBD3C456770C88C718D3B5072E1F5';         export GNUPGHOME="$(mktemp -d)";       gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key";   gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg;         gpgconf --kill all;     rm -rf "$GNUPGHOME";    apt-key list > /dev/null
 ---> Running in b877d69a0c2c
+ key=A4A9406876FCBD3C456770C88C718D3B5072E1F5
+ mktemp -d
+ export GNUPGHOME=/tmp/tmp.SUviPizemM
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5
gpg: keybox '/tmp/tmp.SUviPizemM/pubring.kbx' created
gpg: key 8C718D3B5072E1F5: 3 duplicate signatures removed
gpg: /tmp/tmp.SUviPizemM/trustdb.gpg: trustdb created
gpg: key 8C718D3B5072E1F5: public key "MySQL Release Engineering <mysql-build@oss.oracle.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
+ gpg --batch --export A4A9406876FCBD3C456770C88C718D3B5072E1F5
+ gpgconf --kill all
+ rm -rf /tmp/tmp.SUviPizemM
+ apt-key list
Warning: apt-key output should not be parsed (stdout is not a terminal)
Removing intermediate container b877d69a0c2c
 ---> 0a8bba076f05
Step 9/18 : ENV MYSQL_MAJOR 5.7
 ---> Running in 470ec08f4ae9
Removing intermediate container 470ec08f4ae9
 ---> 1bd1ba722775
Step 10/18 : ENV MYSQL_VERSION 5.7.32-1debian10
 ---> Running in fcc62bbe9be2
Removing intermediate container fcc62bbe9be2
 ---> ab02273adf37
Step 11/18 : RUN echo "deb http://repo.mysql.com/apt/debian/ buster mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list
 ---> Running in bf732fc4ec28
Removing intermediate container bf732fc4ec28
 ---> c9b102a7301e
Step 12/18 : RUN {              echo mysql-community-server mysql-community-server/data-dir select '';          echo mysql-community-server mysql-community-server/root-pass password '';               echo mysql-community-server mysql-community-server/re-root-pass password '';            echo mysql-community-server mysql-community-server/remove-test-db select false;         } | debconf-set-selections      && apt-get update && apt-get install -y mysql-server="${MYSQL_VERSION}" && rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld      && chown -R mysql:mysql /var/lib/mysql /var/run/mysqld && chmod 1777 /var/run/mysqld /var/lib/mysql     && find /etc/mysql/ -name '*.cnf' -print0               | xargs -0 grep -lZE '^(bind-address|log)'              | xargs -rt -0 sed -Ei 's/^(bind-address|log)/#&/'      && echo '[mysqld]\nskip-host-cache\nskip-name-resolve' > /etc/mysql/conf.d/docker.cnf
 ---> Running in 70ca6e448599
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://repo.mysql.com/apt/debian buster InRelease [21.5 kB]
Get:4 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:5 http://security.debian.org/debian-security buster/updates/main amd64 Packages [243 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
Get:7 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 Packages [5685 B]
Get:8 http://deb.debian.org/debian buster-updates/main amd64 Packages [7856 B]
Fetched 8423 kB in 2s (3668 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libaio1 libatomic1 libgpm2 libmecab2 libncurses6 libnuma1 mysql-client
  mysql-common mysql-community-client mysql-community-server psmisc
Suggested packages:
  gpm
The following NEW packages will be installed:
  libaio1 libatomic1 libgpm2 libmecab2 libncurses6 libnuma1 mysql-client
  mysql-common mysql-community-client mysql-community-server mysql-server
  psmisc
0 upgraded, 12 newly installed, 0 to remove and 1 not upgraded.
Need to get 51.2 MB of archives.
After this operation, 313 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 mysql-common all 5.8+1.0.5 [7324 B]
Get:2 http://deb.debian.org/debian buster/main amd64 libaio1 amd64 0.3.112-3 [11.2 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 libatomic1 amd64 8.3.0-6 [9032 B]
Get:4 http://deb.debian.org/debian buster/main amd64 libncurses6 amd64 6.1+20181013-2+deb10u2 [102 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 libnuma1 amd64 2.0.12-1 [26.2 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 psmisc amd64 23.2-1 [126 kB]
Get:7 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 mysql-community-client amd64 5.7.32-1debian10 [14.4 MB]
Get:8 http://deb.debian.org/debian buster/main amd64 libmecab2 amd64 0.996-6 [258 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 libgpm2 amd64 1.20.7-5 [35.1 kB]
Get:10 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 mysql-client amd64 5.7.32-1debian10 [67.2 kB]
Get:11 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 mysql-community-server amd64 5.7.32-1debian10 [36.1 MB]
Get:12 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 mysql-server amd64 5.7.32-1debian10 [67.2 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 51.2 MB in 1s (51.4 MB/s)
Selecting previously unselected package mysql-common.
(Reading database ... 8935 files and directories currently installed.)
Preparing to unpack .../00-mysql-common_5.8+1.0.5_all.deb ...
Unpacking mysql-common (5.8+1.0.5) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../01-libaio1_0.3.112-3_amd64.deb ...
Unpacking libaio1:amd64 (0.3.112-3) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../02-libatomic1_8.3.0-6_amd64.deb ...
Unpacking libatomic1:amd64 (8.3.0-6) ...
Selecting previously unselected package libncurses6:amd64.
Preparing to unpack .../03-libncurses6_6.1+20181013-2+deb10u2_amd64.deb ...
Unpacking libncurses6:amd64 (6.1+20181013-2+deb10u2) ...
Selecting previously unselected package libnuma1:amd64.
Preparing to unpack .../04-libnuma1_2.0.12-1_amd64.deb ...
Unpacking libnuma1:amd64 (2.0.12-1) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../05-mysql-community-client_5.7.32-1debian10_amd64.deb ...
Unpacking mysql-community-client (5.7.32-1debian10) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../06-mysql-client_5.7.32-1debian10_amd64.deb ...
Unpacking mysql-client (5.7.32-1debian10) ...
Selecting previously unselected package psmisc.
Preparing to unpack .../07-psmisc_23.2-1_amd64.deb ...
Unpacking psmisc (23.2-1) ...
Selecting previously unselected package libmecab2:amd64.
Preparing to unpack .../08-libmecab2_0.996-6_amd64.deb ...
Unpacking libmecab2:amd64 (0.996-6) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../09-mysql-community-server_5.7.32-1debian10_amd64.deb ...
Unpacking mysql-community-server (5.7.32-1debian10) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../10-libgpm2_1.20.7-5_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.7-5) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../11-mysql-server_5.7.32-1debian10_amd64.deb ...
Unpacking mysql-server (5.7.32-1debian10) ...
Setting up libmecab2:amd64 (0.996-6) ...
Setting up mysql-common (5.8+1.0.5) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libgpm2:amd64 (1.20.7-5) ...
Setting up psmisc (23.2-1) ...
Setting up libncurses6:amd64 (6.1+20181013-2+deb10u2) ...
Setting up libatomic1:amd64 (8.3.0-6) ...
Setting up libnuma1:amd64 (2.0.12-1) ...
Setting up libaio1:amd64 (0.3.112-3) ...
Setting up mysql-community-client (5.7.32-1debian10) ...
Setting up mysql-client (5.7.32-1debian10) ...
Setting up mysql-community-server (5.7.32-1debian10) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up mysql-server (5.7.32-1debian10) ...
Processing triggers for libc-bin (2.28-10) ...
sed -Ei s/^(bind-address|log)/#&/ /etc/mysql/mysql.conf.d/mysqld.cnf
Removing intermediate container 70ca6e448599
 ---> 5bd408ea9b1e
Step 13/18 : VOLUME /var/lib/mysql
 ---> Running in e2932e4d9bf4
Removing intermediate container e2932e4d9bf4
 ---> 087f7e618a00
Step 14/18 : COPY docker-entrypoint.sh /usr/local/bin/
 ---> 84ff3bb0c526
Step 15/18 : RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
 ---> Running in 249768ff57bc
Removing intermediate container 249768ff57bc
 ---> 9a52068c67cf
Step 16/18 : ENTRYPOINT ["docker-entrypoint.sh"]
 ---> Running in 32b5e0a0e9b1
Removing intermediate container 32b5e0a0e9b1
 ---> 79b8f50c2fbf
Step 17/18 : EXPOSE 3306 33060
 ---> Running in 06236ad5f3c1
Removing intermediate container 06236ad5f3c1
 ---> 362aa7ab4a28
Step 18/18 : CMD ["mysqld"]
 ---> Running in 965b721c89a3
Removing intermediate container 965b721c89a3
 ---> 7decb62ed81f
Successfully built 7decb62ed81f
Successfully tagged mysql5.7.0:latest
$

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。

相关文章

最新评论