运行 Raspberry pi 3B+ 上的 wordpress 图片导致权限错误(无法 utime)

Run a wordpress image on Raspberry pi 3B+ lead to permission errors (cannot utime)

嗨,Whosebug 社区,这是我的第一个问题,我希望以正确的方式提出。我正在按照本教程 https://youtu.be/2NO7NS0ci_U?t=660 在我的 raspberry pi 上使用 docker 运行 wordpress https://youtu.be/2NO7NS0ci_U?t=660 但我获得了与 cannot utime 错误相关的权限(见下文)。

感谢任何帮助。 谢谢

这是我的设置:

Rpi 3B+ 全新 2021-05-07-raspios-buster-armhf-full

Docker 版本 20.10.8

作为 pi 用户在 ssh 中命令 运行:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker
sudo usermod -aG docker ${USER}
exit

新 ssh 登录后(重启后也试过)

docker run hello-world(工作正常)

docker run wordpress(也尝试使用 sudo:结果相同)

pi@pi3:~ $ docker run wordpress
Unable to find image 'wordpress:latest' locally
latest: Pulling from library/wordpress
9bd46ffb253d: Pull complete
98086d1d5d87: Pull complete
98c9e09fff15: Pull complete
750c1d85f381: Pull complete
7adaef0b8aed: Pull complete
be28e83c0418: Pull complete
fbd6fa1d3b53: Pull complete
7b21796a11d2: Pull complete
0f297995bbbd: Pull complete
114dd8297762: Pull complete
9e701fe5e40e: Pull complete
0a932f1e11bf: Pull complete
6b11c1479e58: Pull complete
0169ed751f6b: Pull complete
329c18075091: Pull complete
8de87c5a146e: Pull complete
d3d24e76c670: Pull complete
f7b2cd492c04: Pull complete
756a9050c341: Pull complete
9a0598049986: Pull complete
2146293d383d: Pull complete
Digest: sha256:067833b1827e3f035c2c6b4be5336bf5bef498dafeb4f2d18258e439fa90c6f7
Status: Downloaded newer image for wordpress:latest
WordPress not found in /var/www/html - copying now...
tar: ./wp-settings.php: Cannot utime: Operation not permitted
tar: ./wp-content/themes/twentytwenty/readme.txt: Cannot utime: Operation not permitted
tar: ./wp-content/themes/twentytwenty/comments.php: Cannot utime: Operation not permitted
tar: ./wp-content/themes/twentytwenty/functions.php: Cannot utime: Operation not permitted
... a lot of rows like those...
tar: ./wp-includes/class-walker-nav-menu.php: Cannot utime: Operation not permitted
tar: ./wp-includes: Cannot utime: Operation not permitted
tar: ./wp-signup.php: Cannot utime: Operation not permitted
tar: ./index.php: Cannot utime: Operation not permitted
tar: ./wp-load.php: Cannot utime: Operation not permitted
tar: ./wp-config-docker.php: Cannot utime: Operation not permitted
tar: .: Cannot utime: Operation not permitted
tar: Exiting with failure status due to previous errors

在那一长串 tar 行之后,终端保持忙碌(docker 容器 wordpress 处于活动状态)大约 120 秒,然后 return 可用,此时 wordpress 容器是不再 运行ning 了。 我猜想 docker 甚至 wordpress 的新版本存在一些问题(另一个用户最近遇到了同样的(未回答的)问题,请参阅同一教程 https://www.youtube.com/watch?v=emO2PYfrm84&list=PLibQjquhfgjgBEv9GC7X2JWaqSPkD0lAK&index=11&t=2s 的视频 10 下方的评论)。

“docker image inspect wordpress”命令的结果下方:

pi@pi3:~ $ docker image inspect wordpress
[
{
"Id": "sha256:6fdf2c965d1bab7eb9196c29da0cf47339cf48cb204bfeaae2ef2282ab68d0f7",
"RepoTags": [
"wordpress:latest"
],
"RepoDigests": [
"wordpress@sha256:067833b1827e3f035c2c6b4be5336bf5bef498dafeb4f2d18258e439fa90c6f7"
],
"Parent": "",
"Comment": "",
"Created": "2021-09-04T21:40:55.962780748Z",
"Container": "2be306cf6545eda21fece625f49fdcd682a5e7e85cdc086880b97ccb6e72b378",
"ContainerConfig": {
"Hostname": "2be306cf6545",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"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 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
"PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
"PHP_LDFLAGS=-Wl,-O1 -pie",
"GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312",
"PHP_VERSION=7.4.23",
"PHP_URL=https://www.php.net/distributions/php-7.4.23.tar.xz",
"PHP_ASC_URL=https://www.php.net/distributions/php-7.4.23.tar.xz.asc",
"PHP_SHA256=cea52313fcffe56343bcd3c66dbb23cd5507dc559cc2e3547cf8f5452e88a05d"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"CMD ["apache2-foreground"]"
],
"Image": "sha256:844b269fc6190d103a5df50166d44a27d448ab6d75364627fc986930c603bec1",
"Volumes": {
"/var/www/html": {}
},
"WorkingDir": "/var/www/html",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {},
"StopSignal": "SIGWINCH"
},
"DockerVersion": "20.10.7",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"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 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
"PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
"PHP_LDFLAGS=-Wl,-O1 -pie",
"GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312",
"PHP_VERSION=7.4.23",
"PHP_URL=https://www.php.net/distributions/php-7.4.23.tar.xz",
"PHP_ASC_URL=https://www.php.net/distributions/php-7.4.23.tar.xz.asc",
"PHP_SHA256=cea52313fcffe56343bcd3c66dbb23cd5507dc559cc2e3547cf8f5452e88a05d"
],
"Cmd": [
"apache2-foreground"
],
"Image": "sha256:844b269fc6190d103a5df50166d44a27d448ab6d75364627fc986930c603bec1",
"Volumes": {
"/var/www/html": {}
},
"WorkingDir": "/var/www/html",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null,
"StopSignal": "SIGWINCH"
},
"Architecture": "arm",
"Variant": "v7",
"Os": "linux",
"Size": 456959259,
"VirtualSize": 456959259,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/d4ff7707a48034b1c9f4aaa1a6155fdebf079c0b0b952f4793542cfcf4d175f3/diff:/var/lib/docker/overlay2/1e41dda2267dd61e58ac2928fc1dae2573007d7d5696c998842e50f93f7def62/diff:/var/lib/docker/overlay2/01b9772262ede28d10ba1abea933072a87b316119fece347e2a5897932b3808a/diff:/var/lib/docker/overlay2/8c24afd5ec9c3e2111fde1ef4e9a31ad58f5fa7728aed61d5acf3a846908fc9e/diff:/var/lib/docker/overlay2/17c568b442adb626c1a237b2f1648df49b854108a5f3f84da8ba10e6ab12c31d/diff:/var/lib/docker/overlay2/858e3176a289ef360c843bfe83cd0c1cd31472fb182925376ca3612440d94bf5/diff:/var/lib/docker/overlay2/f4aaca0c035e60b5cd5abfa005dda1c41e01d83fe59e6a773e6fe28506de9285/diff:/var/lib/docker/overlay2/0fd746eba6b6bff62f623ca29cfa4a9d5998c061403a0dad4e649381de76302a/diff:/var/lib/docker/overlay2/87fdb56380a388f4c5b5608177e68884837558801449a06c5f66aaf03a84b687/diff:/var/lib/docker/overlay2/1275f7b4edb2f8cad6a69532f321eb24953be67cdf4944829637f85932bb5f8d/diff:/var/lib/docker/overlay2/f19aaa2acbc0a09dfcfccf97a7f813f3edf2b9337e86b4faa5b03fb917c733db/diff:/var/lib/docker/overlay2/ecf3e76b43b5c397cd1a6311309958c01144b90028a4aebd75c91e14ea1aa7b1/diff:/var/lib/docker/overlay2/5e0168d89a2f8d1ebd8345ac60fa912b532c6c021213fd62faea1d71acbed45c/diff:/var/lib/docker/overlay2/2264e04890d6bfcccda33348b936395505aab41f44cf8430d93990c8dfb167e8/diff:/var/lib/docker/overlay2/6be8ea2ebd000c5b3619f4d1ccbcd35b72e63b64155a4eecd43bff5332a5d7a3/diff:/var/lib/docker/overlay2/c96b4cefe750d9d36871c694607352ef233e1b4fd7ec832aa49d5ceb28f4ada5/diff:/var/lib/docker/overlay2/89d40f63173208285ef462d210ca6b8ab5197b7b15d9b49cf0a53596055238c6/diff:/var/lib/docker/overlay2/1cdc0e9e1e32d38382762613f4042180f11ad24ea123ffbe4f47a41890def750/diff:/var/lib/docker/overlay2/69c47578399b1114b64d3f01cf38a944bc934b5994fe945969fb095ef9ffa592/diff:/var/lib/docker/overlay2/2dadd823a8c034bc214777d4c7e6bf0edc829ab522d5b20925b9df5a9aca3abf/diff",
"MergedDir": "/var/lib/docker/overlay2/a743da6fd4ce297cd64c24c310b2f5437f357a254f48967aeabe4dfef53dfd5c/merged",
"UpperDir": "/var/lib/docker/overlay2/a743da6fd4ce297cd64c24c310b2f5437f357a254f48967aeabe4dfef53dfd5c/diff",
"WorkDir": "/var/lib/docker/overlay2/a743da6fd4ce297cd64c24c310b2f5437f357a254f48967aeabe4dfef53dfd5c/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:e8b9a2d8b2469a0315b17bfb011c0be7f6e26a34c5e515e66c5b5ad8b9817e58",
"sha256:7a570569308278a0576df97caca86f54a4c3dbb525b5326a0a06f840fefd1174",
"sha256:f9b1d4487c8dba47f8f595d7a7ddf9608b5463dadf80d72b724aa0bac45d629f",
"sha256:cec7b002a983227b1bc75402511f61549448229db01d4a269df58feb05c8d81d",
"sha256:ea5e12092b68e0632ec7bd85a9003880bc54175ac69f2807a329e39a5fa7ebbe",
"sha256:f578973ab7576d268089c713c58a201117d80e13293e36e1f6345dab72a6ad0f",
"sha256:d1472db3be815f1fff276c8d7d144c8ca8c2f5deecec2d1f7585f5ffbca53028",
"sha256:a57826c457c055d2f24dce9b5cca2319679d84f265e0b6a43db70e1e5156a719",
"sha256:ad358b9f27644cb7b1393422a09fbadbb1e402463e87054a140316767854e888",
"sha256:fb1423855d1d47f101ee16250d48d94a1ba25fbb3db6fb5481a81f83a1ef9572",
"sha256:ff59399357852561704b55eefed20b1283b90b9f878c3d21242e6d6c36268656",
"sha256:99d2ded3e3939ddb44366b47a95a98c49677b739d7f123c6acad2fcfaa89b537",
"sha256:a4950a49256daf317c99328d1fcff9798be7dade43e1206fd8491bc14bd7688c",
"sha256:b0f146d8dd60bd9a44d2e16fbdc8decf5f98bfbe7e53a34f841ce171460c50d2",
"sha256:7a4320646df2d70d507a4d51f1c8eeea191b8bbcb34d0e8d3ea1a6af5a48b89e",
"sha256:4e459e09e1b627d527b9e15e2ccfd6ebc893addaba7a526f135e65506bc31ce7",
"sha256:4ecc521f7def52c91c3be531cfd3ea7fe61ec9bd1e55ef68250f40596acceae0",
"sha256:3d1b8acee747e5488705cb02ceea71b1cff0e47848074f1749ba8b01837b9aa9",
"sha256:31223861334300261fe9bef5decf9ebf08525822ef97c1b559a4df6926aa5f97",
"sha256:e594c5855359d7fe53c877313d841c366b84a29b9192e36daaaa5fa9ce3f23f7",
"sha256:cb2fec1bee70e0c75421c83df6d86c8bb5c3653d037216dfde030ef4f7850ab7"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
pi@pi3:~ $

问题已通过更新该线程中的 libseccom 解决: https://github.com/docker-library/wordpress/issues/635