The latest fpm-alpine images are not starting up anymore:
$ docker pull wordpress:php7.3-fpm-alpine
$ docker run wordpress:php7.3-fpm-alpine
WordPress not found in /var/www/html - copying now...
/usr/local/bin/docker-entrypoint.sh: line 279: 8 Broken pipe tar "${sourceTarArgs[@]}" .
9 Aborted | tar "${targetTarArgs[@]}"
$ docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b6baad3fc4ba wordpress:php7.3-fpm-alpine "docker-entrypoint.s…" 6 seconds ago Exited (134) 4 seconds ago priceless_burnell
The problem seems to be related to the tar command used to copy WordPress source files.
Also it seems to be related to some upstream changes as it was working well until some days ago:
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
wordpress php7.3-fpm-alpine 7e24fcfcd407 18 hours ago 122MB
wordpress <none> a977539915b1 2 weeks ago 122MB
$ docker run a977539915b1
WordPress not found in /var/www/html - copying now...
Complete! WordPress has been successfully copied to /var/www/html
[31-Jan-2019 20:34:26] NOTICE: fpm is running, pid 1
[31-Jan-2019 20:34:26] NOTICE: ready to handle connections
Ouch, this one's hairy (and I'm able to reproduce).
@ncopa I'm able to reproduce this with just stock Alpine: :disappointed: (any ideas or pointers before we file a proper bug?)
$ docker run -it --rm alpine:3.8
/ # apk add --no-cache tar
/ # tar -cC /tmp . | tar -xC /run/ --no-overwrite-dir
Aborted (core dumped)
(If I remove --no-overwrite-dir, it works fine.)
Edit: added the apk add tar I forgot :sweat_smile:
(FWIW, it appears Alpine 3.9 is also affected.)
To me this is caused by the new tar v1.31.
I don't know if it's a bug or the behaviour of --no-overwrite-dir has changed in some way.
As a quick temporary workaround tar v1.29 from the 3.5 branch can be used instead, it seems to be working as intended:
$ docker run -it --rm alpine:3.8
/ # echo "@wpfix http://dl-cdn.alpinelinux.org/alpine/v3.5/main" > /etc/apk/repositories
/ # apk add --no-cache tar@wpfix
/ # tar -cC /tmp . | tar -xC /run/ --no-overwrite-dir
/ #
tar 1.31 was a security release and has been upgraded in https://github.com/alpinelinux/aports/pull/5967 and backported to 3.8 in https://github.com/alpinelinux/aports/commit/0119db774c8cbd96f7d4d966f9fa9c2f788f223a.
Same problem here, can someone temporary remove this line:
https://github.com/docker-library/wordpress/blob/master/php7.3/fpm-alpine/docker-entrypoint.sh#L70
Some status? it's alpine issue?
Yes, it's an issue with Alpine's tar binary.
@abarani 's solution did not work for me.
I added the following to my Dockerfile
RUN sed -i s/--no-overwrite-dir//g /usr/local/bin/docker-entrypoint.sh
@abarani 's solution did not work for me.
I added the following to my
DockerfileRUN sed -i s/--no-overwrite-dir//g /usr/local/bin/docker-entrypoint.sh
Doesn't work :/
wordpress_1 | /usr/local/bin/docker-entrypoint.sh: line 284: 10 Broken pipe tar "${sourceTarArgs[@]}" .
wordpress_1 | 11 Aborted (core dumped) | tar "${targetTarArgs[@]}"
Also I had to modify ENTRYPOINT
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
Otherwise, this'll happen
ERROR: for elggtk_wordpress_1 Cannot start service wordpress: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"docker-entrypoint.sh\": executable file not found in $PATH": unknown
Filed a proper issue with Alpine at https://bugs.alpinelinux.org/issues/10027.
This seems to be fixed in tar 1.32 which has just been released.
Can anyone confirm whether this is fixed in 5.1?
This is not fixed in Wordpress 5.1 and it can't be fixed there, because the issue is in the underlying Alpine image.
I've provided patches in https://github.com/alpinelinux/aports/pull/6449 and https://github.com/alpinelinux/aports/pull/6463, but they have not been reviewed so far.
This has just been fixed in https://git.alpinelinux.org/aports/commit/?h=3.9-stable&id=2f83e6679839288265479cc210794aeb00315cbc
@tianon could you trigger a rebuild?
It's not quite that simple -- this is something that we get via the php base image, so we need to rebuild PHP, which means we have to delete all those artifacts from our build server (which uses cache _very_ heavily). :disappointed:
Sorry for the circumstances! As a workaround you could add apk add --upgrade --no-cache tar to this image.
Thanks @J0WI , that solves the issue
I feel dumb now, you'd have to chmod +x docker-entrypoint.sh before building. Otherwise, no build errors!
I managed to get the build server cleaned out enough to purge php:*alpine* to rebuild, and it looks like we're good now. :+1:
Great, thank you all!
Most helpful comment
Sorry for the circumstances! As a workaround you could add
apk add --upgrade --no-cache tarto this image.