我用这个: https://hub.docker.com/_/mediawiki/
我这样做:docker pull mediawiki:1.31.1
和... Docker下载版本1.27.5。
图片标记为1.31.1,错误的Mediawiki版本为1.27.5。
删除所有不折叠的图像和容器。
命令docker inspect mediawiki:1.31.1
显示:
"MEDIAWIKI_MAJOR_VERSION=1.27",
"MEDIAWIKI_BRANCH=REL1_27",
"MEDIAWIKI_VERSION=1.27.5",
如何获得1.31.1版本?似乎不可能。
答案 0 :(得分:1)
以我为例。见下文
[root@localhost ~]# docker images | grep -i mediawiki
[root@localhost ~]# docker pull mediawiki:1.31.1
1.31.1: Pulling from library/mediawiki
f17d81b4b692: Already exists
376d99d019dc: Pull complete
80b3573727f0: Pull complete
2c492579cd1f: Pull complete
9127acfc108e: Pull complete
475593d953b6: Pull complete
52442c108349: Pull complete
34b7a8ed8171: Pull complete
57b93ed05069: Pull complete
4299e0bacf8f: Pull complete
9263f9577aad: Pull complete
5ca842beb745: Pull complete
087c6240046d: Pull complete
d31af3632f76: Pull complete
8928fd73d252: Pull complete
b089431ea3f4: Pull complete
2b4c5b4f7f57: Pull complete
1b1adac96a5c: Pull complete
b631ea5aef3e: Pull complete
acc040b08360: Pull complete
Digest: sha256:edfd44b7dcb3765e2debe008ba9b4d6f8ecb0e1ff511f58fcc71b2ba28f57246
Status: Downloaded newer image for mediawiki:1.31.1
[root@localhost ~]# docker images | grep -i mediawiki
mediawiki 1.31.1 8832e1c4afd5 4 days ago 654MB
[root@localhost ~]# docker --version
Docker version 17.06.0-ce, build 02c1d87
如果检查图像,您会发现版本不是1.13.1,如下所示
[root@localhost medaiocean]# docker inspect 8832e1c4afd5 | jq '.[].Config.Env'
[
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
"PHP_INI_DIR=/usr/local/etc/php",
"APACHE_CONFDIR=/etc/apache2",
"APACHE_ENVVARS=/etc/apache2/envvars",
"PHP_EXTRA_BUILD_DEPS=apache2-dev",
"PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi",
"PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie",
"GPG_KEYS=1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3",
"PHP_VERSION=7.0.32",
"PHP_URL=https://secure.php.net/get/php-7.0.32.tar.xz/from/this/mirror",
"PHP_ASC_URL=https://secure.php.net/get/php-7.0.32.tar.xz.asc/from/this/mirror",
"PHP_SHA256=ff6f62afeb32c71b3b89ecbd42950ef6c5e0c329cc6e1c58ffac47e6f1f883c4",
"PHP_MD5=",
"MEDIAWIKI_MAJOR_VERSION=1.27",
"MEDIAWIKI_BRANCH=REL1_27",
"MEDIAWIKI_VERSION=1.27.5",
"MEDIAWIKI_SHA512=2f341ed5afab24b81c315db6bcc58dd617f95231f71408c08bb2a8b974c95b7edd93d0f3c857f24058111c3228b9919a0f1c2fd2f85be940dc571e390225027a"
]
在这种情况下,只需从https://github.com/wikimedia/mediawiki-docker/blob/41b4758701e47c363a49ff2ef8835be5f69cf383/1.31/Dockerfile复制Dockerfile 并手动构建图像。看来他们用错误的标签推送了图像。
[root@localhost medaiocean]# ls
Dockerfile
[root@localhost medaiocean]# docker build -t mediawiki:latest .
[root@localhost medaiocean]# docker images | grep -i media
mediawiki latest 27ffb14d783f 3 minutes ago 687MB
mediawiki 1.31.1 8832e1c4afd5 4 days ago 654MB
[root@localhost medaiocean]# docker inspect 27ffb14d783f | jq '.[].Config.Env'
[
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
"PHP_INI_DIR=/usr/local/etc/php",
"APACHE_CONFDIR=/etc/apache2",
"APACHE_ENVVARS=/etc/apache2/envvars",
"PHP_EXTRA_BUILD_DEPS=apache2-dev",
"PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi",
"PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie",
"GPG_KEYS=1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F",
"PHP_VERSION=7.2.11",
"PHP_URL=https://secure.php.net/get/php-7.2.11.tar.xz/from/this/mirror",
"PHP_ASC_URL=https://secure.php.net/get/php-7.2.11.tar.xz.asc/from/this/mirror",
"PHP_SHA256=da1a705c0bc46410e330fc6baa967666c8cd2985378fb9707c01a8e33b01d985",
"PHP_MD5=",
"MEDIAWIKI_MAJOR_VERSION=1.31",
"MEDIAWIKI_BRANCH=REL1_31",
"MEDIAWIKI_VERSION=1.31.1",
"MEDIAWIKI_SHA512=ee49649cc37d0a7d45a7c6d90c822c2a595df290be2b5bf085affbec3318768700a458a6e5b5b7e437651400b9641424429d6d304f870c22ec63fae86ffc5152"
]