Compare commits

..

4 Commits

Author SHA1 Message Date
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
4 changed files with 34 additions and 4 deletions

View File

@ -110,10 +110,11 @@ Running a virtual Container is much faster than running a full virtual Machine.
- PHP (7.0 - 5.6 - 5.5)
- NGINX
- Redis
- MySQL
- PostgreSQL
- MariaDB
- Redis
- Memcached
- Beanstalkd
- Beanstalkd Console
- Data Volume
@ -189,7 +190,7 @@ Note: you can choose your own combination of software's (containers), another ex
docker-compose up -d php nginx beanstalkd postgres
```
Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `beanstalkd`, `beanstalkd-console`, `data`, `php`.
Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `Memcached`, `beanstalkd`, `beanstalkd-console`, `data`, `php`.
<br>
3 - Open your browser and visit your `{Docker-IP}` address (`http://xxx.xxx.xxx.xxx`).

View File

@ -34,6 +34,7 @@ services:
- /var/lib/postgres
- /var/lib/mariadb
- /var/lib/redis
- /var/lib/memcached
### MySQL Container #########################################
@ -108,4 +109,13 @@ services:
links:
- beanstalkd
### Memcached Container #########################################
memcached:
build: ./memcached
volumes_from:
- data
ports:
- "11211:11211"
### Add more Containers below ###############################

7
memcached/Dockerfile Normal file
View File

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

View File

@ -1,17 +1,29 @@
FROM php:7.0-fpm
# You can change the PHP version from here. After changing the PHP version, check the Memcached section below because it replies on PHP 7.
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 libpq-dev -y
RUN apt-get update && apt-get install \
libpq-dev -y \
curl \
libmemcached-dev
# Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \
pdo_mysql \
pdo_pgsql
# 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
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel