dostergaard (11) [Avatar] Offline
Ch2, Section 2.4.1 Wordpress Example Bug

I tried the Wordpress example in this section but could not start the container because of an error.

Wed Jul 4 09:42:16 2018 (24): Fatal Error Unable to create lock file: Bad file descriptor (9)

I corrected the error by adding “-v /tmp/“ as was suggested by a reader in the forum for the first edition of this book.
docker run -d --name wp3 --link wpdb:mysql -p 80 \
    -v /run/lock/apache2/ \
    -v /run/apache2/ \
    -v /tmp/ \
    --read-only wordpress:4

Macbook Pro, OS X v10.13.5, Docker v18.03.1-ce-mac65
quosco (1) [Avatar] Offline
Also had this issue on MacOS an the command provided by @dostergaard did the trick for me.
There is a on this issue StackOverflow question.

Many thanks for the fix
573878 (3) [Avatar] Offline
Thank you for reporting this problem. We apologize for the inconvenience and thank you for reporting the solution.

I was able to reproduce with Docker for Mac 18.06.1-ce-mac74 and the manuscript is being updated.

We are planning to add another volume for /tmp, as suggested.

Alternatively, you could add one or more tmpfs mounts, e.g.

--tmpfs /tmp:rw,noexec,nosuid,size=65536k