Giter Site home page Giter Site logo

yiisoft / yii2-docker Goto Github PK

View Code? Open in Web Editor NEW
377.0 42.0 201.0 213 KB

Official Docker images suitable for Yii 2.0

Home Page: https://www.yiiframework.com/

License: BSD 3-Clause "New" or "Revised" License

Shell 5.94% PHP 82.27% Hack 11.79%
yii php docker-image yii2 hacktoberfest

yii2-docker's Introduction

Yii2 PHP Docker Image


Build Status

This is the repo of the official Yii 2.0 Framework image on DockerHub for PHP.

About

These Docker images are built on top of the official PHP Docker image, they contain additional PHP extensions required to run Yii 2.0 framework, but no code of the framework itself. The Dockerfile(s) of this repository are designed to build from different PHP-versions by using build arguments.

Available versions for yiisoftware/yii2-php

The following images are built on a weekly basis for arm64 and amd64. For regular commits on master we only build images for amd64 suffixed with -latest/-latest-min.

Minimal images

8.3-apache-min, 8.3-fpm-min, 8.3-fpm-nginx-min
8.2-apache-min, 8.2-fpm-min, 8.2-fpm-nginx-min
8.1-apache-min, 8.1-fpm-min, 8.1-fpm-nginx-min

Development images

8.3-apache, 8.3-fpm, 8.3-fpm-nginx
8.2-apache, 8.2-fpm, 8.2-fpm-nginx
8.1-apache, 8.1-fpm, 8.1-fpm-nginx

Deprecated or EOL versions

8.0-*
7.4-*
7.3-*
7.2-*
7.1-*
7.0-*
5.6-*

Setup

cp .env-dist .env

Adjust the versions in .env if you want to build a specific version.

Note: Please make sure to use a matching combination of DOCKERFILE_FLAVOUR and PHP_BASE_IMAGE_VERSION

Configuration

  • PHP_ENABLE_XDEBUG whether to load an enable Xdebug, defaults to 0 (false) not available in -min images
  • PHP_USER_ID (Debian only) user ID, when running commands as webserver (www-data), see also #15

Building

docker-compose build

Testing

docker-compose run --rm php php /tests/requirements.php

Xdebug

To enable Xdebug, set PHP_ENABLE_XDEBUG=1 in .env file

Xdebug is configured to call ip xdebug.remote_host on 9005 port (not use standard port to avoid conflicts), so you have to configure your IDE to receive connections from that ip.

Documentation

More information can be found in the docs folder.

FAQ

  • We do not officially support Alpine images, due to numerous issues with PHP requirements and because framework tests are not passing.
  • Depending on the (Debian) base-image (usually PHP <7.4) you might need to set X_LEGACY_GD_LIB=1
  • test

yii2-docker's People

Contributors

airmoi avatar albertborsos avatar alex-da avatar armpogart avatar axklim avatar cgsmith avatar ehabamawi avatar fantom409 avatar fcaldarelli avatar gplaza avatar isitar avatar machour avatar mikehaertl avatar odai-alali avatar pchol avatar rustamwin avatar ruudboon avatar samdark avatar sarke avatar schmunk42 avatar tbreuss avatar yyxx9988 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-docker's Issues

Error response from daemon: manifest for yiisoftware/yii2-php:latest not found

Trying to get the image via:

docker pull yiisoftware/yii2-php

and getting the following error:

Using default tag: latest
Error response from daemon: manifest for yiisoftware/yii2-php:latest not found

I was searching for this problem but did not find anything. Some issue on GitHub was having some discussing regarding docker login, but I registered on hub and logged in from local environment and tried to get the image and still having the same error.

Docker info

docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:06 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:06 2017
 OS/Arch:      linux/amd64
 Experimental: false

And then

docker search yiisoftware
NAME                   DESCRIPTION                               STARS     OFFICIAL   AUTOMATED
yiisoftware/yii2-php   Official Docker images suitable for Yii   7  

Which does not make any sense.

Any clue?

Add more flavours for min/common/full

To provide better support for different DBMS and other PHP extensions how about creating different package levels? We could have the following flavours:

  • -min (or no suffix) only contains the bare minimum (what we have now)
  • -common contains the most common extensions and DB drivers
  • -full contains almost all extensions and DB drivers

Each handled by a dedicated Dockerfile e.g. Dockerfile.full in the respective directory. The final images would then become yiisoft/yii2-php:7.1.2-apache-common.

Of course this now opens the box for endless discussion: What is part of "common" and what is part of "full".

Don't see the the variable `PHP_ENABLE_XDEBUG` in use.

# Check if Xdebug extension need to be compiled
RUN cd /tmp && \
    git clone git://github.com/xdebug/xdebug.git && \
    cd xdebug && \
    git checkout 2.7.0beta1 && \
    phpize && \
    ./configure --enable-xdebug && \
    make && \
    make install && \
    rm -rf /tmp/xdebug

# Environment settings
ENV PHP_USER_ID=33 \
    PHP_ENABLE_XDEBUG=0 \
    PATH=/app:/app/vendor/bin:/root/.composer/vendor/bin:$PATH \
    TERM=linux \
    VERSION_PRESTISSIMO_PLUGIN=^0.3.7 \
COMPOSER_ALLOW_SUPERUSER=1

If I am get it right,this code block do two things:

  1. Install Xdebug
  2. Define environment variables

You can't control whether Xdebug will be installing or not by PHP_ENABLE_XDEBUG.

Images at DockerHub are built without xdebug support

And there is no way to enable it during build. At this moment docs are misleading and make you think that putting PHP_ENABLE_XDEBUG=1 in .env or docker-compose file will really enable xdebug.

example Dockerfile:

FROM yiisoftware/yii2-php:7.3-apache

WORKDIR /app

COPY ./composer* ./

RUN composer install --ignore-platform-reqs && \
    mv vendor/bower-asset vendor/bower

COPY ./docker/config/000-default.conf /etc/apache2/sites-available/000-default.conf

COPY . .
version: '3.2'

services:
  backend:
    build:
      dockerfile: Dockerfile
      context: .
    ports:
    - 1337:80
    volumes:
    # Re-use local composer cache via host-volume
    - ~/.composer-docker/cache:/root/.composer/cache:delegated
    # Mount source-code for development
    - ./:/app
    - /app/vendor/
    environment:
    - PHP_ENABLE_XDEBUG=1

We can ensure that there is no files was created for xdebug (config, etc) by logging into created container and checking /etc/php/conf.d/xdebug.ini (there is no such file)

enable xDebug from docker-compose.yml

Hi,
I am new to docker and appreciate a little help
I have the following docker-compose.yml

version: '2'
services:
  php:
    image: yiisoftware/yii2-php:7.1-apache
    volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/app:delegated
    environment:
      PHP_ENABLE_XDEBUG: 1
    ports:
      - '8000:80'

when I run docker-compose up I get an error

 error: 'xdebug' does not exist

I am not sure if I understand this well. Shouldn't it work this way? or should I clone the repository and build my own image with xDebug enabled and then use my image?

UPDATE
I've built a local image with PHP_ENABLE_XDEBUG=1 and then used this image like this

version: '2'
services:
  php:
    image: local/yiisoftware/yii2-php:7.1-apache
    volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/app:delegated
    environment:
      PHP_ENABLE_XDEBUG: 1
    ports:
      - '8000:80'

xDebug is now working.

Why xDebug is not installed by default on the images on Docker Hub as long as it could be disabled by the environment variable PHP_ENABLE_XDEBUG

Bug with build argument

i copied env and exec build, but get next error:

Building php
Step 1/15 : ARG PHP_BASE_IMAGE_VERSION
ERROR: Service 'php' failed to build: Please provide a source image with `from` prior to commit

PS: ubuntu 16.04.5 LTS
Docker version 17.03.2-ce, build f5ec1e2
docker-compose version 1.8.0, build unknown

Nginx image

Since we're providing a specific Apache configuration and FPM would require a specific configuration for a webserver, very often nginx - we should think about providing such an image also.

Error on building

$ docker-compose build
ERROR: .IOError: [Errno 2] No such file or directory: u'.\docker-compose.yml:docker-compose.apache.yml'

Alpine: NumberValidator test with comma-locale fails

Looks like there are some more intl issues: docker-library/php#219

Failed test:

2) yiiunit\framework\validators\NumberValidatorTest::testValidateValueSimple
Failed asserting that false is true.

/yii2/tests/framework/validators/NumberValidatorTest.php:85
/yii2/vendor/phpunit/phpunit/phpunit:52

Test-source:

$this->setCommaDecimalLocale();
$this->assertTrue($val->validate('25,45'));
$this->restoreLocale();

Can someone shed some more light on this?

Composer is not available in the images.

Hi.

I have run both Debian and Alpine version of docker images and both give me that the composer is not available.
I am newbie in Docker word, but this happend:


$ composer create-project yiisoft/yii2-app-basic /app
Could not open input file: composer

Update:
It seems during the docker-compose up command the composer installed, but I cannot use it.


 ---> Running in 45e244ee0d9e
Removing intermediate container 45e244ee0d9e
 ---> ded94e06935d
Step 10/14 : RUN curl -sS https://getcomposer.org/installer | php --         --filename=composer.phar         --install-dir=/usr/local/bin &&     composer clear-cache
 ---> Running in 6470ec5085a6
All settings correct for using Composer
Downloading...

Composer (version 1.6.4) successfully installed to: /usr/local/bin/composer.phar
Use it: php /usr/local/bin/composer.phar

Cache directory does not exist (cache-vcs-dir): 
Cache directory does not exist (cache-repo-dir): 
Cache directory does not exist (cache-files-dir): 
Clearing cache (cache-dir): /root/.composer/cache
All caches cleared.
Removing intermediate container 6470ec5085a6
 ---> f9a0823821af
Step 11/14 : RUN composer global require --optimize-autoloader         "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" &&     composer global dumpautoload --optimize &&     composer clear-cache
 ---> Running in 3273072ea52b
Changed current directory to /root/.composer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing hirak/prestissimo (0.3.7): Downloading (100%)         
Writing lock file
Generating optimized autoload files
Changed current directory to /root/.composer
Generating optimized autoload files
Cache directory does not exist (cache-vcs-dir): 
Clearing cache (cache-repo-dir): /root/.composer/cache/repo
Clearing cache (cache-files-dir): /root/.composer/cache/files
Clearing cache (cache-dir): /root/.composer/cache
All caches cleared.

how use database?

I can't find image of db and some db manager (phpmyadmin, adminer ..). How use it?

Build error on windows 10

On windows 10 have a trouble:

$ docker-compose build
ERROR: .IOError: [Errno 2] No such file or directory: u'.\\docker-compose.yml:docker-compose.apache.yml'

Api tests on Yii2 docker image - apache2 server is not running

Hello. I have problem with Yii2 application running on yiisoftware/yii2-php:7.1-apache. When i try to run codeception api tests with command docker-compose run --rm php codecept run api --coverage, i need apache2 server running, but its not and i get error: file_get_contents(http://localhost/index-test.php/c3/report/clear): failed to open stream: Cannot assign requested address. I think its caused by overwriting command (from documentation of docker-compose run: the command passed by run overrides the command defined in the service configuration.). Is it possible that given command to run tests overrides command to run apache2 server? Has anyone had similar problem?

@update
When i first up container with docker-compose up php and then run command docker-compose exec php codecept run api --coverage it works fine.

usermod for php containers

How about add RUN usermod -u 1000 www-data for php containers? :)

Because now container set root permission for files which create.

Composer permission

Hi.
Composer not executing for www-data user.
Error:

www-data@2cae7b4c925c:/app$ composer install
bash: /usr/local/bin/composer: Permission denied

Add version for cli ?

It works, just push the images to https://hub.docker.com/r/yiisoftware/yii2-php

I tested for php version 7.0 and 7.1
Config:

$ cat .env
## Environment variables for docker-compose command

## Windows settings
# COMPOSE_PATH_SEPARATOR=:

## Apache
COMPOSE_PROJECT_NAME=yii2apache
COMPOSE_FILE=docker-compose.yml:docker-compose.apache.yml
DOCKERFILE_FLAVOUR=debian
PHP_BASE_IMAGE_VERSION=7.1-cli

## PHP-fpm & nginx
# COMPOSE_PROJECT_NAME=yii2fpm
# COMPOSE_FILE=docker-compose.yml:docker-compose.fpm-nginx.yml
# DOCKERFILE_FLAVOUR=alpine
# PHP_BASE_IMAGE_VERSION=7.1.9-fpm-alpine

## Built image name
PHP_IMAGE_NAME=local/yiisoftware/yii2-php-cli
PHP_IMAGE_VERSION_SUFFIX=

Build:

$ docker-compose build
Building php
Step 1/14 : ARG PHP_BASE_IMAGE_VERSION
Step 2/14 : FROM php:${PHP_BASE_IMAGE_VERSION}
 ---> 02edd7fdfaf0
Step 3/14 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 1b3c9b60b4d6
Step 4/14 : RUN apt-get update &&     apt-get -y install         gnupg2 &&     apt-key update &&     apt-get update &&     apt-get -y install             g++             git             curl             imagemagick             libfreetype6-dev             libcurl3-dev             libicu-dev             libfreetype6-dev             libjpeg-dev             libjpeg62-turbo-dev             libmagickwand-dev             libpq-dev             libpng-dev             libxml2-dev             zlib1g-dev             mysql-client             openssh-client             nano             unzip         --no-install-recommends &&         apt-get clean &&         rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Using cache
 ---> d81657dadf21
Step 5/14 : RUN docker-php-ext-configure gd         --with-freetype-dir=/usr/include/         --with-png-dir=/usr/include/         --with-jpeg-dir=/usr/include/ &&     docker-php-ext-configure bcmath &&     docker-php-ext-install         soap         zip         curl         bcmath         exif         gd         iconv         intl         mbstring         opcache         pdo_mysql         pdo_pgsql
 ---> Using cache
 ---> b777f375194b
Step 6/14 : RUN printf "\n" | pecl install         imagick &&     docker-php-ext-enable         imagick
 ---> Using cache
 ---> 1b2e28c79230
Step 7/14 : ENV PHP_USER_ID=33     PHP_ENABLE_XDEBUG=0     PATH=/app:/app/vendor/bin:/root/.composer/vendor/bin:$PATH     TERM=linux     VERSION_PRESTISSIMO_PLUGIN=^0.3.7     COMPOSER_ALLOW_SUPERUSER=1
 ---> Using cache
 ---> 2c156fb50999
Step 8/14 : COPY image-files/ /
 ---> Using cache
 ---> 3fbfa0c84990
Step 9/14 : RUN chmod 700         /usr/local/bin/docker-php-entrypoint         /usr/local/bin/composer
 ---> Using cache
 ---> 4c8d2ffb0f2f
Step 10/14 : RUN curl -sS https://getcomposer.org/installer | php --         --filename=composer.phar         --install-dir=/usr/local/bin &&     composer clear-cache
 ---> Using cache
 ---> 23b3db15460e
Step 11/14 : RUN composer global require --optimize-autoloader         "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" &&     composer global dumpautoload --optimize &&     composer clear-cache
 ---> Using cache
 ---> 71bd4622fc1d
Step 12/14 : WORKDIR /app
 ---> Using cache
 ---> be991d5f02b3
Step 13/14 : RUN rm -rf /var/www/html && ln -s /app/web/ /var/www/html || true
 ---> Using cache
 ---> 3f29b7db7906
Step 14/14 : RUN if command -v a2enmod >/dev/null 2>&1;     then a2enmod rewrite; fi
 ---> Using cache
 ---> 4f12146f15ca
Successfully built 4f12146f15ca
Successfully tagged local/yiisoftware/yii2-php-cli:7.1-cli

Automatic update of images when php/pgsql/mysql are updated

Apparently, the yii2-docker images are out of date in comparison to the php images. (e.g. right now 7.3-apache is based on debian buster whereas it was based on debian stretch when the images were last built...this includes missing security updates to the used apache)

In Docker Hub it is possible to enable triggers for the build depending on updates in other docker repositories. This should be enabled for the used dependencies. https://docs.docker.com/docker-hub/builds/

Correct way to enable xdebug on official image

When using yiisoftware/yii2-php:7.2-apache is there a correct way to enable xdebug without manually connecting to the container? Should I do it in the Dockerfile?

I've tried adding PHP_ENABLE_XDEBUG=1 to my docker-compose.yml, but it resulted in an error:

error: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug does not exist

usage: /usr/local/bin/docker-php-ext-enable [options] module-name [module-name ...]
   ie: /usr/local/bin/docker-php-ext-enable gd mysqli
       /usr/local/bin/docker-php-ext-enable pdo pdo_mysql
       /usr/local/bin/docker-php-ext-enable --ini-name 0-apc.ini apcu apc

Possible values for module-name:
bcmath.so curl.so exif.so gd.so iconv.so imagick.so intl.so mbstring.so opcache.so pdo_mysql.so pdo_pgsql.so soap.so zip.so

Some of the above modules are already compiled into PHP; please check
the output of "php -i" to see which modules are already loaded.

Here's my Dockerfile:

FROM yiisoftware/yii2-php:7.2-apache
RUN a2enmod rewrite

And docker-compose.yml:

version: '3.3'
services:
    app:
        build: .
        volumes:
            - ~/.composer-docker/cache:/root/.composer/cache:delegated
            - ./:/app:delegated
        environment:
            - PHP_ENABLE_XDEBUG=1
        ports:
            - 8000:80
        depends_on:
            - db
            - cache
    db:
        image: mariadb:latest
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD: secret
            MYSQL_DATABASE: yii2testing
            MYSQL_USER: yii2
            MYSQL_PASSWORD: yii2
        volumes:
            - db_data:/var/lib/mysql
        ports:
            - 3306:3306
    cache:
          image: redis:latest
          restart: always
          volumes:
            - cache_data:/data
          ports:
            - 6379:6379
volumes:
    db_data:
    cache_data:

PS: Should I also be running a2enmod rewrite in Dockerfile, or am I missing again some command flag to enable it?

php 7.3?

Hi,

I got an error while building with
PHP_BASE_IMAGE_VERSION=7.3-apache

It works fine with 7.1-apache and 7.2-apache. Does yii2-docker support 7.3 yet?

docker-compose up exited with code 1

Log:

$ docker-compose build
......................................
.................. all ok...........

$ docker-compose up
WARNING: The GITHUB_API_TOKEN variable is not set. Defaulting to a blank string.
Pulling web (phundament/nginx-one:1.9-5.1.1)...
1.9-5.1.1: Pulling from phundament/nginx-one
51f5c6a04d83: Pull complete
a3ed95caeb02: Pull complete
640c8f3d0eb2: Pull complete
a4335300aa89: Pull complete
48f5bf1cb454: Pull complete
bf95fc845e39: Pull complete
03b5acc6259d: Pull complete
22de4320976f: Pull complete
Digest: sha256:65008b29a6c8916884285581a45d4017f38572e69a0c797d5c17cf382b94eb76
Status: Downloaded newer image for phundament/nginx-one:1.9-5.1.1
Creating yii2fpm_php_1 ... done
Creating yii2fpm_web_1 ... done
Attaching to yii2fpm_php_1, yii2fpm_web_1
php_1  | error:  does not exist
php_1  | 
php_1  | usage: /usr/local/bin/docker-php-ext-enable [options] module-name [module-name ...]
php_1  |    ie: /usr/local/bin/docker-php-ext-enable gd mysqli
web_1  | 2018/12/13 13:13:21 [emerg] 11#11: host not found in upstream "php" in /etc/nginx/nginx.conf:66
php_1  |        /usr/local/bin/docker-php-ext-enable pdo pdo_mysql
web_1  | nginx: [emerg] host not found in upstream "php" in /etc/nginx/nginx.conf:66
php_1  |        /usr/local/bin/docker-php-ext-enable --ini-name 0-apc.ini apcu apc
php_1  | 
php_1  | Possible values for module-name:
php_1  | bcmath.so curl.so exif.so gd.so iconv.so imagick.so intl.so mbstring.so mongodb.so opcache.so pdo_mysql.so pdo_pgsql.so soap.so zip.so
php_1  | 
php_1  | Some of the above modules are already compiled into PHP; please check
php_1  | the output of "php -i" to see which modules are already loaded.
yii2fpm_php_1 exited with code 1
yii2fpm_web_1 exited with code 1

.env

## Environment variables for docker-compose command

## Windows settings
# COMPOSE_PATH_SEPARATOR=:

## Apache
#COMPOSE_PROJECT_NAME=yii2apache
#COMPOSE_FILE=docker-compose.yml:docker-compose.apache.yml
#DOCKERFILE_FLAVOUR=debian
#PHP_BASE_IMAGE_VERSION=7.2-apache

# Xdebug (calling the xdebug.remote_host on 9009 port)
PHP_ENABLE_XDEBUG=1

## PHP-fpm & nginx
COMPOSE_PROJECT_NAME=yii2fpm
COMPOSE_FILE=docker-compose.yml:docker-compose.fpm-nginx.yml
DOCKERFILE_FLAVOUR=alpine
PHP_BASE_IMAGE_VERSION=7.1.9-fpm-alpine

## Built image name
PHP_IMAGE_NAME=local/yiisoftware/yii2-php
PHP_IMAGE_VERSION_SUFFIX=

How to run composer install in DockerFile

Need a help for composer

Please explain how run composer install or update

got a error

Composer could not find a composer.json file in /app/web
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

i add code in my dockerfile

Install composer

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

#Install/update Vandor
RUN composer install

Internal versioning of yiiframework/yii2-php

Currently there's no versioning of these images, since they are "just" versioned like the PHP base-image.

Basically the yii2-php images "only" install a set of extensions and won't require much versioning - but you never know. Instead of appending a 1.0, 1.1 suffix, we could also add a string like 20171113 which reflects the image "API" at a certain point of time, ie. available ENV variables. Usually the images should be upgradeable without breaking (but you never know).

@yiisoft/core-developers

oci8 pdo_oci plans?

Is there a plan to add oci8 / pdo_oci support?

i added it in my docker image (before this one was available) like this:

RUN alien -i /opt/oracle/oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm

ENV LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
RUN echo "/usr/lib/oracle/18.3/client64/lib/" > /etc/ld.so.conf.d/oracle.conf && chmod o+r /etc/ld.so.conf.d/oracle.conf
ENV ORACLE_HOME=/usr/lib/oracle/18.3/client64
ENV C_INCLUDE_PATH=/usr/include/oracle/18.3/client64/
RUN  ln -s /usr/include/oracle/18.3/client64 $ORACLE_HOME/include

RUN docker-php-ext-install pdo oci8 pdo_oci

RUN rm -rf /opt/oracle

but it is a real hassle to do it this way since i need to include the oracle-instantclient in my source repository

Forbidden with running config for Yii advance

Hi guys,

I have config docker-compose.yml for Yii 2 with advanced template bellow:

version: '3'
services:
  php:
    image: yiisoftware/yii2-php:7.2-apache
    volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/backend:delegated
    ports:
      - "80:80"
  mongo:
    image: 'mongo:3.6'
    ports:
      - '27017:27017'

When I executing command and get messages: docker-compose up -d --build

Creating network "apkreview_default" with the default driver
Creating apkreview_php_1   ... done
Creating apkreview_mongo_1 ... done

When I access to domain local: localhost
Then I got 403 message http://prntscr.com/inogeq

Please support me how to config correct it,
Thank you so much!

Broken [7.3-fpm-alpine3.10] build

## PHP-fpm & nginx
COMPOSE_PROJECT_NAME=yii2fpm
COMPOSE_FILE=docker-compose.yml:docker-compose.fpm-nginx.yml
DOCKERFILE_FLAVOUR=alpine
PHP_BASE_IMAGE_VERSION=7.3-fpm-alpine3.10

With the above .env i got:

checking for libzip... not found
configure: error: Please reinstall the libzip distribution
ERROR: Service 'php' failed to build: The command '/bin/sh -c apk --update --virtual build-deps add [...] returned a non-zero code: 1

Why there is no not privileged user in the image?

when I connect to the console
docker-compose exec php bash
my user is root
in laradock project for example used --user=laradock
I need run code ./yii with PHP_USER_ID UID
Maybe add user www-data with rights to bash login? Or add user php.

bash-completion not work by www-data user

Now bash-completion work only for root user. User www-data does not have .bashrc file with
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion.d/yii ]; then
. /etc/bash_completion.d/yii
fi
fi

Deprecate 5.6 and 7.0 images

PHP 5.6 and 7.0 reach their EOL in less than one month.
http://php.net/supported-versions.php

Also because of this issue #58 currently we're currently not building updated 5.6 images, see https://hub.docker.com/r/yiisoftware/yii2-php/tags/

How should we deprecate those images?

  • remove the 5.6-... tags, so users would have to go to the latest tagged version, eg. 5.6-fpm-17.12.0 if they still need PHP 5.6
  • or just keep things at is, which can be tricky for a user to find out that an image was not built recently

checkdnsrr() always returns true in alpine images

The issue described here: docker-library/php#442

Leads to:

1) yiiunit\framework\validators\EmailValidatorTest::testValidateValueMx
Failed asserting that true is false.

/yii2/tests/framework/validators/EmailValidatorTest.php:120
/yii2/vendor/phpunit/phpunit/phpunit:52

So the EMailValidator can not be used with checkDNS on Alpine.

How should we handle that?

  • do still not build Alpine images ๐Ÿ˜ž
  • mention it in the docs and skip test
  • throw an Exception when using the checkDNS setting on Alpine

unable to load mcrypt in `5.6-apache`

I get the following error on image 5.6-apache
kepernyofoto 2017-12-01 - 19 14 01

I added this line to my Dockerfile which solves this issue:

RUN docker-php-ext-install mcrypt

But this is not the correct solution because i got the following message in the build process

warning: mcrypt (mcrypt.so) is already loaded!

Mod_rewrite in apache flavor

Hi,
I create a app using the 7.1-apache version and the image don't have do mod_rewrite enabled.
We activate by default?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.