Comments (12)
I think you should have used docker-php-ext-install for mcrypt
Something like this works for me (I probably also install some libraries which you don't need though. these you can leave out):
FROM php:5.6-cli
#update repo
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libbz2-dev \
php-pear \
curl \
git \
&& docker-php-ext-install iconv mcrypt \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
#Download dependencies
# Set memory limit
RUN echo "memory_limit=1024M" > /usr/local/etc/php/conf.d/memory-limit.ini
# Set environmental variables
ENV COMPOSER_HOME /root/composer
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install \
zip \
bz2 \
iconv \
mcrypt \
mbstring
# Set up the application directory.
VOLUME ["/app"]
WORKDIR /app
# Set up the command arguments
CMD ["-"]
ENTRYPOINT ["composer", "--ansi"]
from docker-composer.
Interesting. Does a follow-up php5enmod mcrypt
do anything?
from docker-composer.
No, that does nothing.
I think the problem comes from the base php:5.6-cli image. If I build a Dockerfile from scratch, then the mcrypt extension is loaded.
Dockerfile:
FROM debian:jessie
RUN apt-get update -y
RUN apt-get install -y php5-cli php5-dev php5-json curl git-core
RUN apt-get install -y zlib1g zlib1g-dev php5-common mcrypt
RUN apt-get install -y php5-curl php5-mcrypt php5-readline php-pear
RUN php5enmod curl json readline mcrypt pdo
RUN pecl install zip
# Set memory limit.
RUN echo "memory_limit=1024M" > /etc/php5/cli/conf.d/memory-limit.ini
RUN curl -sS https://getcomposer.org/installer | php
# Set up the command arguments
CMD ["-"]
ENTRYPOINT ["/composer.phar", "--ansi"]
Loaded modules:
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mhash
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
from docker-composer.
Think we should ditch php:5.6-cli?
from docker-composer.
Unfortunately, I do not know exactly what causing the problem inside the php image. But inside the php:5.6-cli image are some things adjusted (paths, compile options, ...) which deviate from the standard PHP installation on Debian.
from docker-composer.
@cbeier Is there another PHP-CLI Docker Container that you would recommend we use?
from docker-composer.
@RobLoach I have forked the container from ubermuda and customized (added necessary php extensions). My fork on github: https://github.com/cbeier/docker-composer and on docker: https://registry.hub.docker.com/u/cbeier/composer/
I currently know of no other php-cli container. Most container include php-cli with the used command line app.
from docker-composer.
I have the same problem with mcrypt. Now using your fork @cbeier .
from docker-composer.
Opened up a PR for this: #18
from docker-composer.
Hi,
I've similar issue with the mbstring extension see details here : https://bugs.php.net/bug.php?id=71181
from docker-composer.
I can't reproduce this anymore on a recent docker pull is this issue still present?
from docker-composer.
Going to close this for now. Feel free to open up a new issue if it persists.
from docker-composer.
Related Issues (20)
- Warning: This development build of composer is over 60 days old. HOT 2
- How to mount the composer cache into the container? HOT 4
- --no-interaction appears to be implied HOT 1
- ERROR: docker run --rm -v $PWD/:/app composer/composer install HOT 1
- the requested PHP extension intl is missing HOT 3
- Pear is broken HOT 1
- PEAR tmp fix breaks the builds of Alpine-based images HOT 1
- iconv() not working
- Composer require very slow HOT 4
- new docker images? HOT 6
- configure: error: Please reinstall the BZip2 distribution HOT 1
- Add soap
- Error when installing composer HOT 10
- composer/composer:php7 php eversion HOT 5
- error: cannot run ssh: No such file or directory fatal: unable to fork
- master-php7.1.4-alpine not found by docker. HOT 1
- Add docker-compose example to README HOT 1
- Too Many Deps HOT 3
- How to add extension php-intl HOT 3
- Issue with docker-php-ext-install with the alpine image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-composer.