Comments (12)
Hmm, we're running nightly builds of this: https://git.hrzg.de/dmstr/docker-php-yii2/pipelines without issues.
Did you verify that this is no network issue or something similar?
from docker-php-yii2.
in my home pc, i have same problem.
OS win10 and win8.1
from docker-php-yii2.
Could you show the commands you use to build the images locally?
cp .env-dist .env
docker-compose build
Along with the output of docker version
and docker-compose version
.
from docker-php-yii2.
i set GITHUB_API_TOKEN
and add PHP_ENABLE_XDEBUG=1
in .env
, then run docker-compose build
. It's all my action.
$ docker version
Client:
Version: 17.10.0-ce
API version: 1.33
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:00:02 2017
OS/Arch: windows/amd64
Server:
Version: 17.10.0-ce
API version: 1.33 (minimum version 1.12)
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:05:23 2017
OS/Arch: linux/amd64
Experimental: false
$ docker-compose version
docker-compose version 1.16.1, build 6d1ac219
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
$ docker-compose build
Building php-nginx
Step 1/7 : FROM dmstr/php-yii2:latest
---> 65b35de1d17b
Step 2/7 : RUN curl -O https://bin.equinox.io/a/c6JW1BqJwSa/forego-20170327195458-linux-amd64.tar.gz && tar -xzf forego-20170327195458-linux-amd64.tar.gz -C /usr/local/bin
---> Using cache
---> 64780f591a81
Step 3/7 : RUN apt-get update && apt-get install -y --force-yes nginx-full cron --no-install-recommends && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
---> Using cache
---> 55300eb21a44
Step 4/7 : COPY image-files/ /
---> Using cache
---> 4b5cab83d3e2
Step 5/7 : RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log && ln -sf /usr/sbin/cron /usr/sbin/crond
---> Using cache
---> c5cb804627b6
Step 6/7 : CMD ["forego", "start", "-r", "-f", "/root/Procfile"]
---> Using cache
---> cbba275118d7
Step 7/7 : EXPOSE 80 443
---> Using cache
---> ccedb908f535
Successfully built ccedb908f535
Successfully tagged local/dmstr/php-yii2-nginx:latest
Building php
Step 1/12 : FROM php:7.1.9-fpm
---> ef5e0d5be0a0
Step 2/12 : ENV CUSTOM_BUILD_DEPS unzip libmemcached-dev libicu-dev libmcrypt-dev libfreetype6-dev libjpeg-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libxml2-dev zlib1g-dev
---> Using cache
---> da7f0c5e0677
Step 3/12 : ENV CUSTOM_REMOVE_LIST cpp cpp-4.9 g++-4.9 gcc-4.9 libgcc-4.9-dev libhashkit-dev libsasl2-dev libstdc++-4.9-dev
---> Using cache
---> 699e83f7b8bf
Step 4/12 : RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - && apt-key update && apt-get -y install $CUSTOM_BUILD_DEPS $PHPIZE_DEPS git mysql-client openssh-client nano linkchecker nodejs --no-install-recommends && npm -g install npm@latest && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ && docker-php-ext-configure bcmath && docker-php-ext-install gd intl pdo_mysql mbstring mcrypt opcache zip bcmath soap && curl https://codeload.github.com/php-memcached-dev/php-memcached/zip/php7 -o /tmp/memcached.zip && mkdir -p /usr/src/php/ext && unzip /tmp/memcached.zip -d /usr/src/php/ext && docker-php-ext-configure /usr/src/php/ext/php-memcached-php7 --disable-memcached-sasl && docker-php-ext-install /usr/src/php/ext/php-memcached-php7 && rm -rf /usr/src/php/ext/php-memcached-php7 /tmp/memcached.zip && printf "\n" | pecl install apcu-5.1.3 xdebug-stable && docker-php-ext-enable apcu && apt-get remove -y $PHPIZE_DEPS $CUSTOM_BUILD_DEPS $CUSTOM_REMOVE_LIST && dpkg --purge $(dpkg -l | awk '/^rc/ { print $2 }') && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
---> Using cache
---> dc95cdad80cc
Step 5/12 : RUN npm install -g less lesshint uglify-js uglifycss
---> Using cache
---> 9efc534a6b6d
Step 6/12 : ENV PHP_USER_ID=33 PHP_ENABLE_XDEBUG=0 VERSION_COMPOSER_ASSET_PLUGIN=^1.4.2 VERSION_PRESTISSIMO_PLUGIN=^0.3.7 PATH=/app:/app/vendor/bin:/root/.composer/vendor/bin:$PATH TERM=linux COMPOSER_ALLOW_SUPERUSER=1
---> Using cache
---> c6efe0c65563
Step 7/12 : COPY image-files/ /
---> Using cache
---> fa5fa2585de0
Step 8/12 : RUN chmod 700 /usr/local/bin/docker-entrypoint.sh /usr/local/bin/docker-run.sh /usr/local/bin/composer
---> Using cache
---> 21d0553a86ce
Step 9/12 : RUN curl -sS https://getcomposer.org/installer | php -- --filename=composer.phar --install-dir=/usr/local/bin && composer global require --optimize-autoloader "fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && composer global dumpautoload --optimize && composer clear-cache
---> Running in abd029ead7eb
All settings correct for using Composer
Downloading...
Composer (version 1.5.2) successfully installed to: /usr/local/bin/composer.phar
Use it: php /usr/local/bin/composer.phar
: No such file or directory
ERROR: Service 'php' failed to build: The command '/bin/sh -c curl -sS https://getcomposer.org/installer | php -- --filename=composer.phar --install-dir=/usr/local/bin && composer global require --optimize-autoloader "fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && composer global dumpautoload --optimize && composer clear-cache' returned a non-zero code: 127
from docker-php-yii2.
Could you split the composer command into single RUN
lines in the Dockfile
to see which step fails, should be the composer require ...
but I want to be sure.
I am somehow clueless since I can't reproduce it (CC: @J-Reichl could you check that on a Windows machine)
from docker-php-yii2.
Step 9/15 : RUN curl -sS https://getcomposer.org/installer | php -- --filename=composer.phar --install-dir=/usr/local/bin
---> Running in d05f364d141a
All settings correct for using Composer
Downloading...
Composer (version 1.5.2) successfully installed to: /usr/local/bin/composer.phar
Use it: php /usr/local/bin/composer.phar
---> d5f2ccfd5d7d
Step 10/15 : RUN composer global require --optimize-autoloader "fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}"
---> Running in 363d5fd0badc
: No such file or directory
ERROR: Service 'php' failed to build: The command '/bin/sh -c composer global require --optimize-autoloader "fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}"' returned a non-zero code: 127
from docker-php-yii2.
i replace RUN compose
to RUN php /usr/local/bin/composer.phar
, and it worked.:)
from docker-php-yii2.
Strange?! Can you run composer
directly in the container after building the image?
docker-compose run php composer -v
from docker-php-yii2.
UnicodeDecodeError again
$ docker-compose run php composer -v
Traceback (most recent call last):
File "docker-compose", line 6, in <module>
File "compose\cli\main.py", line 68, in main
File "compose\cli\main.py", line 121, in perform_command
File "compose\cli\main.py", line 762, in run
File "compose\cli\main.py", line 1172, in run_one_off_container
File "compose\cli\main.py", line 1252, in call_docker
File "distutils\spawn.py", line 220, in find_executable
File "ntpath.py", line 85, in join
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 7: ordinal not in range(128)
Failed to execute script docker-compose
from docker-php-yii2.
Related? docker/compose#3817
from docker-php-yii2.
I was able to reproduce the issue on a Windows 10 64 machine.
Seems like it can be resolved by the
git config --global core.autocrlf false
command
before git clone ...
and docker-compose build
Could you please try it this way to verify wether it's working for you as well or not?
Found at docker/labs#215
from docker-php-yii2.
@schmunk42 Yes, the Windows user name contains non ASCII characters. I don't want to change it :)
@J-Reichl Yes, it works
Thanks for help.
from docker-php-yii2.
Related Issues (20)
- Updating images HOT 3
- Use stable mcrypt version when 7.2.0 is released HOT 9
- Question: is memcached dependency dropped from the last images? HOT 2
- Optimize Debian image size HOT 2
- [5.0-alpha] Align npm versions for debian and alpine
- Update composer asset plugin in images HOT 1
- Is there any good idea for Yii2 migration in Docker? HOT 3
- Time zone problem HOT 4
- Only 7.0-fpm in docker hub HOT 3
- Support HTTP/2 in nginx image HOT 1
- Question. Image updates HOT 10
- yii phpunit and codecept with permission denied upon run on GCE HOT 1
- Add PHP 7.3-rc HOT 6
- [Q] How to use cron? HOT 1
- Setting timezone in php.ini HOT 1
- Package fxp/composer-asset-plugin at version ^1.4.1 has a PHP requirement incompatible with your PHP version HOT 4
- Why install php in nginx if php runs in a separate container ? HOT 1
- composer 2 with PHP 7.4 HOT 1
- Is "8.1-fpm-8.0-beta1-nginx" production ready? 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-php-yii2.