Installing php5 via docker deletes files
I’m having a hard time pinning down the exact cause, but it seems that
if I install php5 via docker the php5
binary gets removed.
Here is an example Dockerfile:
FROM alpine:edge
RUN apk --update add php5-cli \
php5-cgi \
php5-ctype \
php5-curl \
php5-dom \
php5-gd \
php5-gettext \
php5-iconv \
php5-json \
php5-pdo \
php5-pdo_mysql \
php5-pear \
php5-posix \
php5-xml \
php5-xmlrpc
RUN ls -la /usr/bin/php* && php5 -v
Which returns
-rwxr-xr-x 1 root root 8784608 Apr 28 15:52 /usr/bin/php-cgi5
/bin/sh: php5: not found
The command '/bin/sh -c ls -la /usr/bin/php* && php5 -v' returned a non-zero code: 127
If I install the same packages from the cli (docker run —rm -it
alpine sh
), php5 seems to install fine. Is there something
specific to docker that needs to be taken in to account?
(from redmine: issue id 8867, created on 2018-05-09, closed on 2018-05-14)