Giter Site home page Giter Site logo

maxpou / docker-symfony Goto Github PK

View Code? Open in Web Editor NEW
1.3K 76.0 479.0 681 KB

:whale: A docker multicontainer with NGINX, PHP7-FPM, MySQL and ELK (Elasticsearch Logstash and Kibana)

Home Page: http://www.maxpou.fr/docker-pour-symfony/

License: MIT License

Dockerfile 100.00%
docker symfony docker-symfony php7 mysql nginx docker-compose

docker-symfony's Introduction

👋 hey, I'm Max.

BlogTwitterPersonal readme


I am working a Senior Software Engineer at Orderfox where I am building software for the CNC industries.

  • 🏗 I works with react (focusing on architecture, accessibility and testing)
  • 📝 I blog at maxpou.fr
  • ✈️ I travel. Often.
  • 👨🏼‍🏫 I mentor people who want to retrain in software development
  • 📫 Feel free to ping me on Twitter @_maxpou

Some posts I wrote

docker-symfony's People

Contributors

carlosas avatar clifinger avatar enekochan avatar lazyants avatar leroy0211 avatar maksslesarenko avatar maxpou avatar meron1122 avatar n1c01a5 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  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

docker-symfony's Issues

Redis Connection

I have been trying to follow your example, everything seems to be set successfully, I can see the redis container from the php one. Using Symfony3, Postgres and Redis.

My error is as follow:

2017-09-25 23:36:36] request.CRITICAL: Uncaught PHP Exception Predis\Connection\ConnectionException: "Cannot assign requested address [tcp://localhost:6379]" at /var/www/symfony/vendor/predis/predis/src/Connection/AbstractConnection.php line 155 {"exception":"[object] (Predis\Connection\ConnectionException(code: 99): Cannot assign requested address [tcp://localhost:6379] at /var/www/symfony/vendor/predis/predis/src/Connection/AbstractConnection.php:155)"} []

How to use

Hello, how can I use it? I just copy paste the contents of docker-symfony to my symfony app and followed the instructions but I can't still run my app.

Symfony 3.4+

Would you consider adding support for Symfony 3.4+ applications either on a separate branch or by way of an environment variable or some such?

The nginx configuration would need to send requests to public/index.php instead of web/app(_dev).php, and the PHP version would need to be bumped to 7.1.3^

Enable xdebug

It would be great, if you add support for xdebug in php!

Regards

xdebug install error

Hi,
I've got this error when I execute docker-compose build command

No releases available for package "pecl.php.net/xdebug"
install failed
ERROR: Service 'php' failed to build: The command '/bin/sh -c pecl install xdebug' returned a non-zero code: 1

Why is nginx container is accessible with http://localhost on Windows and not with 172.19.0.5 ?

Hi,

docker network inspect dockersymfony_default tells the IP of nginx container is 172.19.0.5. I can access nginx with this IP from other containers in network (php, db, ...).

BUT from the host machine (Windows) nginx container is not accessible by 172.19.0.5. On the other hand nginx is accessible by 127.0.0.1 or localhost.

[
{
    "Name": "dockersymfony_default",
    "Id": "12b4f5a663450bb44e87f9635860bbcede354f2fea27f93b056d7159251dc465",
    "Scope": "local",
    "Driver": "bridge",
    "EnableIPv6": false,
    "IPAM": {
        "Driver": "default",
        "Options": null,
        "Config": [
            {
                "Subnet": "172.19.0.0/16",
                "Gateway": "172.19.0.1"
            }
        ]
    },
    "Internal": false,
    "Containers": {
        "1eef50ee350782654bb96e7d16d09e3b9fe54abca97cc339a89791083e08563c": {
            "Name": "dockersymfony_db_1",
            "EndpointID": "8b48ea4934a01703ac23a7f27f8cee0ff9226b7b5401550859b22fbf17a4c10a",
            "MacAddress": "02:42:ac:13:00:03",
            "IPv4Address": "172.19.0.3/16",
            "IPv6Address": ""
        },
        "1faf199dd6285c6700640b570fd842212962c299d762c531b011205f58598102": {
            "Name": "dockersymfony_nginx_1",
            "EndpointID": "a9be2a542565262d31c93f7d1960a13e373f5a701c299cedf3dc0510c8de9bf4",
            "MacAddress": "02:42:ac:13:00:05",
            "IPv4Address": "172.19.0.5/16",
            "IPv6Address": ""
        },
        "2c2b994c92895e7a83c189d1e5002d2eb7d88f62761f8c324f00ffdece4efb4a": {
            "Name": "dockersymfony_php_1",
            "EndpointID": "98a0ad7bef2f2c963c68561bb2b56bc0feb113c390a29c0dd9aefd6e32b7e5be",
            "MacAddress": "02:42:ac:13:00:04",
            "IPv4Address": "172.19.0.4/16",
            "IPv6Address": ""
        },
        "65ee8088e6bc2405b80c56ae21d83a4f4f7fff252a7e782c4046629d670f7b74": {
            "Name": "dockersymfony_redis_1",
            "EndpointID": "80fcd76b2fe0326be8d30abaffe2310ef58f23935f0f67f7476fa4fad951cba6",
            "MacAddress": "02:42:ac:13:00:02",
            "IPv4Address": "172.19.0.2/16",
            "IPv6Address": ""
        },
        "86665f35aa1599028d8e91aa45f86505a112b44496386e674b7039458dcda45f": {
            "Name": "dockersymfony_elk_1",
            "EndpointID": "c82ef8cc18f1cc345e97c3bdd0e04f0bf398efc0c38f9876b0e922a1e6dd494c",
            "MacAddress": "02:42:ac:13:00:06",
            "IPv4Address": "172.19.0.6/16",
            "IPv6Address": ""
        }
    },
    "Options": {},
    "Labels": {}
}
]

Why is that ?

I suppose that this problem is the cause of another one: xdebug doesn't work.

problem

Hi, I'm trying to setup my environment, everything goes ok until composer install, I can to connect to bash but ther is no code in it, it's like the volume is not correctly mounted or something.

I have my symfony app and in it's root folder I copied this repo files and mofied docker-composer.yml php section like this:

php:
        build: php7-fpm
        ports:
            - 9000:9000
        volumes:
            - ./:/var/www/symfony
            - ./logs/symfony:/var/www/symfony/app/logs

When I connected to bash I only see app/logs folder... so I can't executate composer install.... any help?

add environment variables

Hi, great repo!

Is it possible to add environment variables to nginx config?
For host name etc?

Thanks in advance!

Can't access to symfony.dev

OS: macOS Sierra
Docker: 1.12.1
$ docker inspect --format '{{ .NetworkSettings.Networks.dockersymfony_default.IPAddress }}' $(docker ps -f name=nginx -q)
172.18.0.5

$ cat /etc/hosts
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
172.18.0.5 symfony.dev

$ ping symfony.dev
PING symfony.dev (172.18.0.5): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
^C
--- symfony.dev ping statistics ---
8 packets transmitted, 0 packets received, 100.0% packet loss`

$ docker-compose ps
dockersymfony_db_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
dockersymfony_elk_1 /usr/bin/supervisord -n -c ... Up 0.0.0.0:81->80/tcp
dockersymfony_nginx_1 nginx Up 443/tcp, 0.0.0.0:80->80/tcp
dockersymfony_php_1 php-fpm Up 0.0.0.0:9000->9000/tcp
dockersymfony_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp

Extensions not installable ?

Hello!!

First of, that's a great job you did and it would definetley save me from using Wamp from windows.
I cloned my git repository inside the /var/www/symfony and when i try to composer install it says that mcrypt is not found now the question as written above : how do I simply add an extension because every move i tried i had to install once again php7.0 from a different ppa

Thanks in advance.

Fabricio

Update README

Hey maxpou!

I think there is a little problem in Part 4 of Installation paragraph.
You add the PHP container IP address in the HOST file, while I think it should be the Nginx address.

I'll make a PR and comment the issue.

Thanks for the article ;)

403 on app_dev.php

I cant access to symfony.dev/app_dev.php, i get 403.
I'm on ubuntu and need to run docker with sudo (sudo docker-compose up) or i have:

"ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable."

Unfortunately cache in prod env make me crazy

Can you help me?

MySQL connection failed

Hello!
I'm starting a new project using symfony and your containers. But I face with this error on establishing the MySQL connection: SQLSTATE[HY000] [2002] Connection refused

I googled this issue and they suggest to use localhost instead of 127.0.0.1 as a host. If I change this I get another error: SQLSTATE[HY000] [2002] No such file or directory.

I spent all the day trying to find the solution, but still no result. I tried all the combinations of hosts, ports, database name, also different usernames (root and user) - no result.

If I try to connest MySQL from command line - this works fine.

Not to have any config issues I was trying to create connection directly:
$conn = new \PDO('mysql:dbname=mydb;host=localhost;charset=UTF8;unix_socket=/var/run/mysqld/mysqld.sock', 'user', 'userpass'); - so I'm sure this is just connection issue, but not a symfony problem. I just tried to use socket as the guys recommended in StackOverflow.

Do you have any ideas how to sort this?
Thanks, Alex.

SSL for nginx

Hello

Thank for you repo.

Can you explain me how to integrate an SSL certificate on nginx

Des soucis avec les toolbox

Bonjour

Je suis tombé sur ton dépôt et merci beaucoup.
Je suis arrivé à faire un docker-compose build et up, sans aucun soucis.

Le soucis est que quand je cherche à utiliser une des instructions de toolbox, 'obtiens:
Traceback (most recent call last): File "<string>", line 3, in <module> File "compose\cli\main.py", line 58, in main File "compose\cli\main.py", line 109, in perform_command File "compose\cli\main.py", line 348, in exec_command NameError: global name 'ExecOperation' is not defined docker-compose returned -1

Aurais-tu une idée?
Merci d'avance.

Can't install php7.0-gd

I have this in my Dockerfile of php container:

RUN apt-get update && apt-get install -y \
    git \
    unzip \
    php7.0-gd

While building container, error occurs:

E: Unable to locate package php7.0-gd

Any idea how to install GD library because need it in my Symfony application?

UPDATE:

Also tried and added to php Dockerfile:

RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libpng12-dev \
    && docker-php-ext-install -j$(nproc) iconv mcrypt \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd

Still got Exception from:

        if (!function_exists('gd_info')) {
            throw new RuntimeException('Gd not installed');
        }

install a PHP Accelerator

For symfony PHP needs a php accelerator. For example:

  • OPcache
  • APC
  • XCache
  • EAccelerator

This makes everything so much faster, by default!

aws

Hi, how can I set this up on an AWS ubuntu instance? it's timing out via the browser

mysql error

Hello
with this latest version I have an error with mysql due to permissions issues on Mac, please any idea I've been checking this king of issue on forums but... ?

db_1 | 2016-08-24T15:52:03.578202Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1 | 2016-08-24T15:52:03.595285Z 0 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2016-08-24T15:52:03.600991Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2016-08-24T15:52:03.610361Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
db_1 | 2016-08-24T15:52:03.610461Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error

Remove Redis (make it optional)

Hi everyone,

I'm planning to remove Redis. I don't want to integrate it natively.
Instead, I prefer make it optional.

TODO:

  • Update schema.pptx
  • Update docker-compose.yml
  • Remove redis mention in readme.md
  • Add/edit the custom.md file to explain how to add Redis in this stack

For smaller images, you could use alpine images instead of the debian images.

To have much less space, and much more quicker builds you could use alpine base images instead of the debian images.

Keep in mind that some things are not possible, because alpine is very light weight!.

Xdebug is one of them that might not be possible without a lot of extra packages. But when using multiple versions, you could create an alpine version of this stack for each php version.

forced to use symfony.dev ?

I don't think it makes sense to force the use of symfony.dev. It's quite restrictive for example if you want to run multiple of this build on a server, you need to edit the config of each containers. In my opinion, the virtualhost filtering should be done by a reverse proxy, not by this container.

I would propose to

  1. rm /etc/nginx/site-available/default.conf and
  2. make symfony.conf default_server

if we want to keep this feature, it should be at least a parameter in .env

cannot docker-compose up db

when i run sudo docker-compose up db , it failed:

mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied)

Using ADD instead of volumes - Assets not found

Hi.

I am trying to ADD the application files to the PHP container instead of mounting them.
The application files are added but while accessing it on the prod environment assets can not be found even after dumping them, fixing permissions errors and clearing the cache. Every request to an asset returns a 404 (Not Found), although they are in the container. It works fine in the dev environment tough. Maybe it is related to the nginx configurations but I don't really know.

So, what changes do I have to do in order to ADD instead of mounting volumes?

Xdebug is enabled but are we able to debug application using an IDE like phpStorm?

I was looking for a good Docker environment for develop Symfony2|3 apps and I think this one fit. :D I have seen that Xdebug is enabled but are we able to debug application using an IDE like phpStorm? Where is that documentation? If not I would like to contribute to this repository by adding that support and maybe continue improving it

Redis

Hello,
First of all, thanks for your repo, it makes learning Docker with Symfony a bliss :)

I just have a question concerning the Redis part.
When using the line redis_host: redis I have the following error :

Invalid configuration for path "snc_redis.clients.doctrine.dsns.0": The redis DSN "redis" is invalid.

I had to use redis_host: redis://redis instead.

I'm still learning how to use Docker, am I missing something ?
I'm using Symfony3 and SncRedisBundle.

Thanks

mysql does'nt run on docker-machine

I'm run docker-compose up --build -d and the mysql container not run. It's exited:

77ae1742b530        mysql               "docker-entrypoint..."   7 minutes ago       Exited (1) 7 minutes ago                                             docker_db_1
8b5bab8e8f0b        eugenmayer/unison   "/entrypoint.sh su..."   15 minutes ago      Up 15 minutes              500/tcp, 192.168.99.100:32768->5000/tcp   app-sync
bdaf31c50d92        willdurand/elk      "/usr/bin/supervis..."   15 minutes ago      Up 15 minutes              0.0.0.0:81->80/tcp                        docker_elk_1
f4d8da863781        docker_nginx        "nginx"                  15 minutes ago      Up 15 minutes              0.0.0.0:80->80/tcp, 443/tcp               docker_nginx_1
bf9df980de74        docker_php          "docker-php-entryp..."   15 minutes ago      Up 15 minutes              9000/tcp                                  docker_php_1

The logs of the container docker logs 77ae1742b530;

2017-08-28T16:36:34.006312Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-08-28T16:36:34.008060Z 0 [Warning] Can't create test file /var/lib/mysql/77ae1742b530.lower-test
2017-08-28T16:36:34.008398Z 0 [Note] mysqld (mysqld 5.7.19) starting as process 1 ...
2017-08-28T16:36:34.014280Z 0 [Warning] Can't create test file /var/lib/mysql/77ae1742b530.lower-test
2017-08-28T16:36:34.014781Z 0 [Warning] Can't create test file /var/lib/mysql/77ae1742b530.lower-test
2017-08-28T16:36:34.019741Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-08-28T16:36:34.019989Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-08-28T16:36:34.020013Z 0 [Note] InnoDB: Uses event mutexes
2017-08-28T16:36:34.020031Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-08-28T16:36:34.020046Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-08-28T16:36:34.020060Z 0 [Note] InnoDB: Using Linux native AIO
2017-08-28T16:36:34.033325Z 0 [Note] InnoDB: Number of pools: 1
2017-08-28T16:36:34.034769Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-08-28T16:36:34.037023Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-08-28T16:36:34.054841Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-08-28T16:36:34.057033Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-08-28T16:36:34.067414Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-08-28T16:36:34.067542Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-08-28T16:36:34.067568Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-08-28T16:36:34.669620Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-08-28T16:36:34.669655Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-08-28T16:36:34.669660Z 0 [ERROR] Failed to initialize plugins.
2017-08-28T16:36:34.669663Z 0 [ERROR] Aborting

2017-08-28T16:36:34.669669Z 0 [Note] Binlog end
2017-08-28T16:36:34.669930Z 0 [Note] Shutting down plugin 'CSV'
2017-08-28T16:36:34.671131Z 0 [Note] mysqld: Shutdown complete

Mysql remote connections

Hi,

When I fill in the following at step 4.iii:

$ sf3 doctrine:database:create

I get this error:

[Doctrine\DBAL\Exception\DriverException]                                                                                                               
  An exception occured in driver: SQLSTATE[HY000] [1130] Host 'dockersymfony_php_1.dockersymfony_default' is not allowed to connect to this MySQL server

I think it happened because remote connections in mysql is disabled?

Here is my parameters.yml

# This file is auto-generated during the composer install
parameters:
    database_host: mysqldb
    database_port: null
    database_name: symfony
    database_user: root
    database_password: root

Thanks.

Uncaught PHP Exception Doctrine\DBAL\Exception\ConnectionException

Hi, thanks for your work.
I have a problem, which I can't handle by self. All things configured as described in readme. And generally symfony app works, but until I don't try to make a query. Confusing thing is what I can create database, update scheme, but can't perform queries in my app. I checked log files this is the message. I have no idea how to solve it. Could you give any tip about this issue?
Thanks.

Uncaught PHP Exception Doctrine\DBAL\Exception\ConnectionException: "An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused" at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 {"exception":"[object ] (Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:103, Doctrine\\DBAL\\Driver\\PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} []

Entering http://symfony.dev/ = ERR_CONNECTION_TIMED_OUT

Done all by your instructions in README. Got ERR_CONNECTION_TIMED_OUT error while entering http://symfony.dev address. Don't know how to enter the project...

On http://localhost I'm getting "Welcome to nginx on Debian!" page.

ALSO, can't connect to my MySQL server via remote application like MySQL Workbench.
screenshot_1

(Windows 10 here)

Can't connect using symfony.dev

Hi,

First of all, great package! Really love it.

I've followed all the steps, and everything works fine, except I can't connect to the server itself. (The connection just times out).

docker network inspect bridge | grep Gateway
returns 172.17.0.1, so that looks fine.

But still, trying to connect to symfony.dev or 172.17.0.1 is not possible.
I'm not running any proxies,... and I updated the hosts to include symfony.dev.

When running docker network inspect bridge
the containers don't show up under containers, shouldn't they be there?

UPDATE:
I have found that docker-compose makes it's own network (docker_default). This gateway is 172.20.0.1, and the containers are listed when I run docker network inspect docker_default, but I am not able to connect to that one either.

UPDATE 2:
If i go to localhost, I get served with the default nginx page. So, I'm guessing something is going wrong with the configuretion of the symfony part?

Thank you.

Permissions problem after every cache clearing

Hello again,

I've got problem in which after every sf3 cache:clear in php container I'm getting:

Cache directory "/var/www/site/var/cache/dev" is not writable.

When I set chmod -R 777 on my cache directory (on host), everything is ok, but when I again use above cache clearing command, the problem is back. Do I really need to set permissions on each cache clearing? Any proposals what to add to Dockerfile?

Very slow Symfony app

Hi,
I've god Symfony 3 application in Docker CE on my Windows 10 machine. Loading time of this app is about 4-5 seconds. Symfony initialization is about 600ms. I've got even opcache installed and that time is, still, HUGE!
What could be wrong? :(

MySQL container does not start

When doing docker-compose up on osx I get an error message:

db_1 | chown: changing ownership of '/var/lib/mysql/': Operation not permitted
maxpou_db_1 exited with code 1

When I do a 'docker ps' I get only:

elk
nginx
php

It works when I add a mysql_data volume:

services:
db:
volumes:
- mysql_data:/var/lib/mysql

volumes:
mysql_data

docker info:
Containers: 19
Running: 1
Paused: 0
Stopped: 18
Images: 288
Server Version: 1.13.1
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 359
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.47-boot2docker
Operating System: Boot2Docker 1.13.1 (TCL 7.2); HEAD : b7f6033 - Wed Feb 8 20:31:48 UTC 2017
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.955 GiB
Name: dinghy
ID: UXNT:LKPY:CI3D:KNOC:SPY2:QFC7:MKSF:OPJB:7ANJ:M6PM:N3XW:FSGW
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 24
Goroutines: 32
System Time: 2017-05-04T07:22:34.976096987Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Insecure Registries:
127.0.0.0/8

Dockerfile reducing RUNs

From my understanding of Docker - I'm not a guru - each time you use a RUN command, it creates a temporary cached image. In this case, I think there are way to many RUNs

# install xdebug
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
RUN echo "error_reporting = E_ALL" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "display_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.idekey=\"PHPSTORM\"" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_port=9001" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

could be written

# install xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "error_reporting = E_ALL" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "display_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.idekey=\"PHPSTORM\"" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_port=9001" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

which would result in a single subimage created.

I'm keen to contribute.

cheers

Can´t connect with websocket

Hi, im using this docker image with WebSocketBundle symfony works great, but i can´t connect from my local env with docker to connect with websocket.
var webSocket = WS.connect("ws://127.0.0.1:1337");

In local env without docker websocket work.
I need to change anything in dockerfile or modify nginx config?

Thx in advance.

Add Optional Nodejs

Used more and more in applications for various use cases. Would be great o have optional node similar to optional redis.

Additonal configuration options

It's probably a good idea to have a env. option for the timezone.
Also it's good to make another branch or add option for PHP 7.1.

Windows Hyper-V, can't share volumns

Hi,

i like the modular config in this docker package and try to run it.
Everything looks fine in Kitematic. Elk restarted constantly, cause it exit always with code 1, but this is not my problem right now.

The symfony project folder are not synced with the nginx or php container. In Kitematic the folders are listed. But if i explore the files directly in the container with ls, i get an null result.

Maxence, or anybody else, do you have any hints to solve this problem?

greetings

Installation issues under Linux Mint

This looks like a great package for symfony, but I have a couple of issues.

  1. At the 4th step you write to edit the app/config/parameters.yml, but unfortunately there is no such file
  2. At the 4th step you write to execute "composer install", but I get the following messages:

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer could not find a composer.json file in /var/www/symfony
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

I guess for the last problem I should download the json file from composer website. is this right?

Thank you in advance for your help...

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.