Compare commits

...

111 Commits

Author SHA1 Message Date
8d216f83d5 Merge pull request #101 from appleboy/gd
Support gd extension.
2016-06-16 17:47:04 +03:00
05c5fcf216 Support gd extension.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-16 14:57:27 +08:00
fccee522c6 update the readme 2016-06-11 20:49:04 +03:00
f3eb6a5fc4 Merge branch 'support-mongo'
* support-mongo:
  add Mongo Support to the Readme
  added php-mongodb extension
  simple reformatting
  set the original volume path
  get mongo volum from the data container
  added mongodb driver for php5.5 5.6
  added mongodb image + PHP7 driver

Fix Conflicts in:
	docker-compose.yml
	php-fpm/Dockerfile-55
	php-fpm/Dockerfile-56
	php-fpm/Dockerfile-70
	php-fpm/laravel.ini
2016-06-11 17:29:27 +03:00
685c34d12d add Mongo Support to the Readme 2016-06-11 17:10:18 +03:00
ceba1af3ae Merge pull request #94 from AminMkh/AminMkh-mongodb-extension
added php-mongodb extension
2016-06-11 15:47:16 +03:00
c4100b5052 added php-mongodb extension 2016-06-11 14:38:26 +03:00
1148a3d051 Merge pull request #91 from LaraDock/xdebug
Xdebug
2016-06-03 15:06:57 +03:00
bec1a32550 format the laravel.ini file 2016-06-03 15:01:56 +03:00
72cde8a8ea Merge branch 'patch-3' of https://github.com/appleboy/laradock into appleboy-patch-3
* 'patch-3' of https://github.com/appleboy/laradock:
  clean apt source file after install.
  install xdebug to generate coverage report for unit testing.
2016-06-03 14:39:53 +03:00
4f9cdb02c6 link global gulp to be used locally 2016-06-03 14:16:46 +03:00
1673a80daf clean apt source file after install.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-03 14:21:52 +08:00
f130381cfe install xdebug to generate coverage report for unit testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-03 14:04:33 +08:00
eda286ded2 Merge pull request #87 from LaraDock/appleboy-patch-1
Appleboy patch 1 (fixing volumes mounting)
2016-06-03 01:52:24 +03:00
a8b4b61e28 update the volumes mounting of the DB containers 2016-06-03 01:50:11 +03:00
124a3553e6 simple reformatting 2016-06-01 14:45:27 +03:00
3ff4aaca79 set the original volume path 2016-06-01 14:44:40 +03:00
4c06a03ead get mongo volum from the data container 2016-06-01 14:44:10 +03:00
1cb131ba36 Merge branch 'master' of https://github.com/AminMkh/laradock into AminMkh-master
* 'master' of https://github.com/AminMkh/laradock:
  added mongodb driver for php5.5 5.6
  added mongodb image + PHP7 driver
2016-06-01 12:59:17 +03:00
99b54c5f7d remove unnecessary data volume of redis.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-01 13:44:41 +08:00
8993cccc2c basic updates to the reamdme 2016-05-31 19:15:29 +03:00
1090bb4db6 added mongodb driver for php5.5 5.6 2016-05-30 23:26:40 +03:00
9c7054abe2 added mongodb image + PHP7 driver 2016-05-29 14:19:43 +03:00
e7decdaaf7 add debugging section to the readme 2016-05-28 11:04:05 +03:00
18bf12bfde Merge pull request #74 from abyshakes/master
Issue #73 unable to install workspace container
2016-05-26 21:17:51 +03:00
d829482a06 Issue #73 unable to install workspace container 2016-05-25 22:33:29 +05:30
86c6389650 Merge pull request #70 from Gummibeer/patch-2
Issue #69
2016-05-24 19:49:35 +03:00
991e28046d Issue #69
add memcached to php-cli
2016-05-24 16:44:52 +02:00
ccbc73c6bc update the readme file 2016-05-24 14:01:07 +03:00
246c7366ba Merge pull request #68 from Gummibeer/patch-1
Issue #67
2016-05-24 13:23:13 +03:00
762e2ec07b Issue #67
Issue #67
simpler docker IP-Address get command
2016-05-24 11:54:07 +02:00
adaaa25f47 remove the Laravel installer from the workspace container 2016-05-23 23:32:59 +03:00
11a13a0c33 Merge pull request #66 from AminMkh/workspace-postgres-driver
added postgres driver
2016-05-23 23:24:27 +03:00
c642560993 added postgres driver
added postgres driver to workspace container.
2016-05-23 23:20:07 +03:00
ea9f5c635f Merge pull request #64 from AminMkh/master
Update docker-compose.yml
2016-05-23 23:00:09 +03:00
fd4253afb6 Update docker-compose.yml 2016-05-23 22:23:10 +03:00
73310e45e8 Merge pull request #62 from AminMkh/master
Update README.MD
2016-05-23 21:53:55 +03:00
7f91fc9798 Update README.MD 2016-05-23 21:45:38 +03:00
a8a7685a40 basic changes to the readme format 2016-05-21 19:19:03 +03:00
06c4c19a6f replace official neo4j image with tpires/neo4j
because of this wired error
(https://github.com/neo4j/docker-neo4j/issues/33)
2016-05-20 21:21:19 +03:00
8bff7656f6 add neo4j support to the readme file 2016-05-20 20:37:00 +03:00
5c9eb97db5 Support Neo4j DB (beta) 2016-05-20 20:35:10 +03:00
588819ab6d turn errors and access logs on by default for nginx 2016-05-20 20:32:33 +03:00
170b63a3ba edit redis volume 2016-05-20 09:26:29 +03:00
19813e48c3 add demo video to the readme 2016-05-20 09:24:26 +03:00
be7b8ee056 update the readme (installation steps) 2016-05-19 21:40:25 +03:00
01a056dd25 make the workspace container run automatically 2016-05-19 20:49:16 +03:00
70e1b0fe41 update readme file 2016-05-19 18:04:53 +03:00
0959b25c05 add sqlite support to the readme 2016-05-19 03:42:36 +03:00
1d8336a9e1 add cleaning to free some space during provisioning the workspace
Fixing E: You don't have enough free space in /var/cache/apt/archives/
2016-05-19 03:25:02 +03:00
f0e2d83618 add sqlite in the workspace
it could be removed to it’s own container later
2016-05-19 03:06:34 +03:00
7f1deb0342 update how to get IP address on Linux, in the readme 2016-05-19 02:49:07 +03:00
703887a2a6 add Node, Gulp and Bower to the readme 2016-05-18 22:54:46 +03:00
84e6b2b6ff Merge pull request #52 from mattythebatty/add-npm-bower-gulp
Install node, npm, gulp and bower to the workspace container
2016-05-18 22:49:31 +03:00
c3ff9e485b Install node, npm, gulp and bower to the workspace container 2016-05-18 20:20:16 +01:00
77f9183c83 reformat the readme file (organize all the sections) 2016-05-18 20:56:48 +03:00
378181044c update readme file
- Add “Change the PHP-CLI Version”
- Add “Install PHP Extensions”
2016-05-18 20:21:15 +03:00
01bdaae690 Add "Run Artisan Commands" to the readme 2016-05-18 11:48:02 +03:00
68aca9f8f9 small updates to the readme file 2016-05-18 11:24:13 +03:00
6d0ecaecf4 general updates to the readme files 2016-05-18 11:17:58 +03:00
a434588a66 Merge pull request #50 from LaraDock/develop
Develop
2016-05-18 11:14:59 +03:00
5aa01b1757 add the new way of using LaraDock in the readme 2016-05-18 11:12:21 +03:00
3b2831bf1d add alias for phpunit in the .bashrc 2016-05-18 10:25:54 +03:00
7171996843 replace composer path 2016-05-18 09:05:45 +03:00
66f08a4f60 fix .bashrc exports and alises 2016-05-18 08:40:08 +03:00
07a07ab3ac install php xml in the workspace container 2016-05-18 08:23:53 +03:00
fb4fcdcb23 Install the Laravel Installer in the workspace container 2016-05-18 08:07:54 +03:00
a69681b07c install the php zip extention in the workspace 2016-05-18 07:58:33 +03:00
2c05c87400 update the logs section 2016-05-18 07:56:12 +03:00
16a1041ef5 clean the workspace container 2016-05-18 07:53:14 +03:00
5ef193d55b update readme 2016-05-18 07:16:20 +03:00
4d8a798224 Create Application Container to hold App code 2016-05-18 07:13:19 +03:00
1574231a80 replace ubuntu 16.04 with lighter ubuntu version 2016-05-18 07:11:49 +03:00
6eb3a9bd5f fix nginx not connecting to php port 9000 2016-05-18 06:29:33 +03:00
377f24fe2b keep workspace container alive with tty 2016-05-18 06:28:31 +03:00
51b6d4f844 update readme file (php section) 2016-05-18 04:38:46 +03:00
97500508f5 reformat the workspace Dockerfile 2016-05-18 03:54:21 +03:00
7dcf481d21 install nano in the workspace container 2016-05-18 02:54:35 +03:00
efd062fd88 fix linking containers to php-fpm instead of php 2016-05-18 02:54:23 +03:00
504c9c59d5 Create workspace container
the workspace container is based from Ubuntu 16.04
it includes PHP-CLI 7 - Git - cURL and Vim for now
2016-05-18 02:46:27 +03:00
4edf941872 rename php to php-fpm
preparing to add php cli as part of the workspace container
2016-05-18 02:43:23 +03:00
36b49f5ae2 formatting and small updates 2016-05-17 23:47:26 +03:00
e49836ba90 Merge pull request #48 from appleboy/patch-1
Replace docker-compose rm with down command.
2016-05-17 17:35:12 +03:00
84f766363d Replace docker-compose rm with down command. 2016-05-17 10:50:51 +08:00
03c991c89d Merge pull request #47 from mattythebatty/php-5-memcached
Add memcached support for PHP 5.5 & 5.6
2016-05-14 19:47:37 +03:00
fdba7e7c09 add memcached support for PHP 5.5 & 5.6 2016-05-14 17:21:36 +01:00
405067d4af Separate the PHP versions to multiple dockerfiles
Because there's some difference in installing some libraries
between PHP 5 and PHP 7. There must be multiple php dockerfiles.
For that I created 3 docker files each of a different version,
this will make it easy for the users to switch between the PHP
version by just editing the docker-compose file and not touching
the dockerfiles.
2016-05-14 04:50:47 +03:00
7f4e411d3d link containers to PHP 2016-05-14 04:20:20 +03:00
e946573d75 general updates to the readme file 2016-05-13 02:00:25 +03:00
470873acd2 add Memcached support to the readme file 2016-05-12 15:23:42 +03:00
88d5dd7806 Merge pull request #44 from mattythebatty/memcached-support
Memcached support
2016-05-12 15:12:46 +03:00
295a0974da install php memcached 2016-05-12 02:28:44 +01:00
cf89670671 add memcached support 2016-05-12 02:17:39 +01:00
40899bc40f remove the duplicated volumes from DBs dockerfiles 2016-05-09 15:53:16 +03:00
64bf3222af set php work directory to laravel's directory 2016-05-09 15:45:54 +03:00
79009cc97e Merge branch 'benmag-master'
* benmag-master:
  Install pdo_pgsql extension
2016-05-09 14:59:13 +03:00
571bf64eb2 Install pdo_pgsql extension 2016-05-09 13:08:08 +10:00
75b1705820 Merge remote-tracking branch 'LaraDock/master' 2016-05-09 12:09:57 +10:00
12587bc712 Support Beanstalkd and Beanstalkd Console
Closes feature #38
2016-05-09 05:02:15 +03:00
81f2602464 Support MariaDB
closes feature #21
2016-05-09 04:23:03 +03:00
ecefee4d65 update postgres volume path 2016-05-09 04:20:03 +03:00
de8cbb0605 simple updates to docker compose and readme 2016-05-08 15:21:59 +03:00
5190da831a remove containers names from docker-compose
to void conflict while scalling using the scale command
2016-05-08 13:39:43 +03:00
fdaa983e77 update readme, put requirements in table 2016-05-08 11:25:43 +03:00
e52f8f5613 update readme file, add more details on linux 2016-05-08 10:54:10 +03:00
f9c13090c6 general updates to the readme file 2016-05-07 19:59:59 +03:00
bfa0d54b5a add features list to the readme file 2016-05-07 19:51:45 +03:00
7f80888fc1 add more info to the readme file 2016-05-07 18:48:27 +03:00
aa338d534e Merge remote-tracking branch 'LaraDock/master' 2016-05-07 14:53:55 +10:00
31793a3cc9 general updates to the readme file 2016-05-07 05:58:20 +03:00
ab7f3d8fd9 Merge remote-tracking branch 'LaraDock/master' 2016-05-07 12:12:43 +10:00
22 changed files with 1033 additions and 253 deletions

812
README.md

File diff suppressed because it is too large Load Diff

7
application/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM debian:jessie
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
WORKDIR /var/www/laravel
CMD ["true"]

View File

@ -0,0 +1,15 @@
FROM php:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
RUN apt-get update && apt-get install -y curl
RUN curl -sL https://github.com/ptrofimov/beanstalk_console/archive/master.tar.gz | tar xvz -C /tmp
RUN mv /tmp/beanstalk_console-master /source
RUN apt-get remove --purge -y curl && apt-get autoclean && apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 2080
CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source/public'

16
beanstalkd/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM phusion/baseimage:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ENV DEBIAN_FRONTEND noninteractive
ENV PATH /usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN apt-get update
RUN apt-get install -y beanstalkd
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
VOLUME /var/lib/beanstalkd/data
EXPOSE 11300
CMD ["/usr/bin/beanstalkd"]

View File

@ -1,46 +1,58 @@
version: '2' version: '2'
services: services:
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./php-fpm
dockerfile: Dockerfile-70
volumes_from:
- application
expose:
- "9000"
links:
- workspace
### Laravel Application Code Container ######################
application:
build: ./application
volumes:
- ../:/var/www/laravel
### Databases Data Container ################################
data:
build: ./data
volumes:
- /var/lib/mysql:/var/lib/mysql
- /var/lib/postgres:/var/lib/postgres
- /var/lib/mariadb:/var/lib/mariadb
- /var/lib/memcached:/var/lib/memcached
- /var/lib/redis:/data
- /var/lib/neo4j:/var/lib/neo4j/data
- /var/lib/mongo:/data/db
### Nginx Server Container ################################## ### Nginx Server Container ##################################
nginx: nginx:
build: ./nginx build: ./nginx
container_name: nginx
volumes_from: volumes_from:
- php - application
volumes: volumes:
- ./logs/nginx/:/var/log/nginx - ./logs/nginx/:/var/log/nginx
ports: ports:
- "80:80" - "80:80"
- "443:443"
links: links:
- php - php-fpm
### PHP Container ###########################################
php:
build: ./php
container_name: php
volumes:
- ../:/var/www/laravel
- ./logs/php/:/usr/local/var/log
expose:
- "9000"
### DATA Container ##########################################
data:
build: ./data
container_name: data
volumes:
- /var/lib/mysql
- /var/lib/postgresql/data
- /var/lib/redis
### MySQL Container ######################################### ### MySQL Container #########################################
mysql: mysql:
build: ./mysql build: ./mysql
container_name: mysql
volumes_from: volumes_from:
- data - data
ports: ports:
@ -50,14 +62,11 @@ services:
MYSQL_USER: homestead MYSQL_USER: homestead
MYSQL_PASSWORD: secret MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: root
links:
- php
### PostgreSQL Container #################################### ### PostgreSQL Container ####################################
postgres: postgres:
build: ./postgres build: ./postgres
container_name: postgres
volumes_from: volumes_from:
- data - data
ports: ports:
@ -66,17 +75,87 @@ services:
POSTGRES_DB: homestead POSTGRES_DB: homestead
POSTGRES_USER: homestead POSTGRES_USER: homestead
POSTGRES_PASSWORD: secret POSTGRES_PASSWORD: secret
links:
- php ### MariaDB Container #######################################
mariadb:
build: ./mariadb
volumes_from:
- data
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root
### Neo4j Container #########################################
neo4j:
build: ./neo4j
ports:
- "7474:7474"
- "1337:1337"
environment:
- NEO4J_AUTH=homestead:secret
volumes_from:
- data
### MongoDB Container #######################################
mongo:
build: ./mongo
ports:
- "27017:27017"
volumes_from:
- data
### Redis Container ######################################### ### Redis Container #########################################
redis: redis:
build: ./redis build: ./redis
container_name: redis
volumes_from: volumes_from:
- data - data
ports: ports:
- "6379:6379" - "6379:6379"
### Memcached Container #####################################
memcached:
build: ./memcached
volumes_from:
- data
ports:
- "11211:11211"
links:
- php-fpm
### Beanstalkd Container ####################################
beanstalkd:
build: ./beanstalkd
ports:
- "11300:11300"
privileged: true
links:
- php-fpm
### Beanstalkd Console Container ############################
beanstalkd-console:
build: ./beanstalkd-console
ports:
- "2080:2080"
links:
- beanstalkd
### Workspace Utilities Container ###########################
workspace:
build: ./workspace
volumes_from:
- application
tty: true
### Add more Containers below ############################### ### Add more Containers below ###############################

7
mariadb/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM mariadb:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
CMD ["mysqld"]
EXPOSE 3306

7
memcached/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM memcached:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
CMD ["memcached"]
EXPOSE 11211

12
mongo/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM mongo:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
#COPY mongo.conf /usr/local/etc/mongo/mongo.conf
VOLUME /data/db /data/configdb
CMD ["mongod"]
EXPOSE 27017

View File

@ -2,8 +2,6 @@ FROM mysql:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me> MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
VOLUME /var/lib/mysql
CMD ["mysqld"] CMD ["mysqld"]
EXPOSE 3306 EXPOSE 3306

7
neo4j/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM tpires/neo4j
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
VOLUME /var/lib/neo4j/data
EXPOSE 7474 1337

View File

@ -5,7 +5,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD nginx.conf /etc/nginx/ ADD nginx.conf /etc/nginx/
ADD laravel.conf /etc/nginx/sites-available/ ADD laravel.conf /etc/nginx/sites-available/
RUN echo "upstream php-upstream { server php:9000; }" > /etc/nginx/conf.d/upstream.conf RUN echo "upstream php-upstream { server php-fpm:9000; }" > /etc/nginx/conf.d/upstream.conf
RUN usermod -u 1000 www-data RUN usermod -u 1000 www-data

View File

@ -17,8 +17,8 @@ http {
types_hash_max_size 2048; types_hash_max_size 2048;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
access_log off; access_log on;
error_log off; error_log on;
gzip on; gzip on;
gzip_disable "msie6"; gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;

45
php-fpm/Dockerfile-55 Normal file
View File

@ -0,0 +1,45 @@
FROM php:5.5-fpm
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
RUN apt-get update && apt-get install -y \
libpq-dev \
libmemcached-dev \
curl \
libpng12-dev \
libfreetype6-dev \
--no-install-recommends \
&& rm -r /var/lib/apt/lists/*
# configure gd library
RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2
# Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \
pdo_mysql \
pdo_pgsql \
gd
# Install memcached
RUN pecl install memcached \
&& docker-php-ext-enable memcached
# Install xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# Install mongodb driver
RUN pecl install mongodb
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel
CMD ["php-fpm"]
EXPOSE 9000

45
php-fpm/Dockerfile-56 Normal file
View File

@ -0,0 +1,45 @@
FROM php:5.6-fpm
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
RUN apt-get update && apt-get install -y \
libpq-dev \
libmemcached-dev \
curl \
libpng12-dev \
libfreetype6-dev \
--no-install-recommends \
&& rm -r /var/lib/apt/lists/*
# configure gd library
RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2
# Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \
pdo_mysql \
pdo_pgsql \
gd
# Install memcached
RUN pecl install memcached \
&& docker-php-ext-enable memcached
# Install xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# Install mongodb driver
RUN pecl install mongodb
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel
CMD ["php-fpm"]
EXPOSE 9000

49
php-fpm/Dockerfile-70 Normal file
View File

@ -0,0 +1,49 @@
FROM php:7.0-fpm
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
RUN apt-get update && apt-get install -y \
libpq-dev \
libmemcached-dev \
curl \
libpng12-dev \
libfreetype6-dev \
--no-install-recommends \
&& rm -r /var/lib/apt/lists/*
# configure gd library
RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2
# Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \
pdo_mysql \
pdo_pgsql \
gd
# Install Memcached for php 7
RUN curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
&& mkdir -p /usr/src/php/ext/memcached \
&& tar -C /usr/src/php/ext/memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
&& docker-php-ext-configure memcached \
&& docker-php-ext-install memcached \
&& rm /tmp/memcached.tar.gz
# Install xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# Install mongodb driver
RUN pecl install mongodb
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel
CMD ["php-fpm"]
EXPOSE 9000

4
php-fpm/laravel.ini Normal file
View File

@ -0,0 +1,4 @@
date.timezone=UTC
display_errors=Off
log_errors=On
extension=mongodb.so

View File

@ -1,16 +0,0 @@
FROM php:7.0-fpm
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
# Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \
pdo_mysql
RUN usermod -u 1000 www-data
CMD ["php-fpm"]
EXPOSE 9000

View File

@ -1,3 +0,0 @@
date.timezone = UTC
display_errors = Off
log_errors = On

View File

@ -2,8 +2,6 @@ FROM postgres:latest
MAINTAINER Ben M <git@bmagg.com> MAINTAINER Ben M <git@bmagg.com>
VOLUME /var/lib/postgresql/data
CMD ["postgres"] CMD ["postgres"]
EXPOSE 5432 EXPOSE 5432

View File

@ -4,6 +4,8 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
#COPY redis.conf /usr/local/etc/redis/redis.conf #COPY redis.conf /usr/local/etc/redis/redis.conf
CMD [ "redis-server" ] VOLUME /data
EXPOSE 6379 EXPOSE 6379
CMD ["redis-server"]

86
workspace/Dockerfile Normal file
View File

@ -0,0 +1,86 @@
FROM phusion/baseimage:latest
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
RUN DEBIAN_FRONTEND=noninteractive
RUN locale-gen en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LC_CTYPE=UTF-8
ENV LANG=en_US.UTF-8
ENV TERM xterm
# Install "software-properties-common" (for the "add-apt-repository")
RUN apt-get update && apt-get install -y \
software-properties-common
# Add the "PHP 7" ppa
RUN add-apt-repository -y \
ppa:ondrej/php
# Install PHP-CLI 7, some PHP extentions and some useful Tools with APT
RUN apt-get update && apt-get install -y --force-yes \
php7.0-cli \
php7.0-common \
php7.0-curl \
php7.0-json \
php7.0-xml \
php7.0-mbstring \
php7.0-mcrypt \
php7.0-mysql \
php7.0-pgsql \
php7.0-sqlite \
php7.0-sqlite3 \
php7.0-zip \
php7.0-memcached \
php7.0-gd \
php-dev \
libcurl4-openssl-dev \
libedit-dev \
libssl-dev \
libxml2-dev \
xz-utils \
sqlite3 \
libsqlite3-dev \
git \
curl \
vim \
nano \
nodejs \
nodejs-dev \
npm
# Clean up, to free some space
RUN apt-get clean
# Install gulp and bower with NPM
RUN npm install -g \
gulp \
bower
# Link the global gulp to be used locally
RUN npm link gulp
# Add a symbolic link for Node
RUN ln -s /usr/bin/nodejs /usr/bin/node
# Add an alias for PHPUnit
RUN echo "alias phpunit='./vendor/bin/phpunit'" >> ~/.bashrc
# Install Composer
RUN curl -s http://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/ \
&& echo "alias composer='/usr/local/bin/composer.phar'" >> ~/.bashrc
# Install mongodb extension
RUN pecl install mongodb
RUN echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini
# Source the bash
RUN . ~/.bashrc
# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /var/www/laravel