Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
a1fd2aabcd | |||
3e2b413094 | |||
ec3ebb9701 | |||
cfc48b3791 | |||
3725ad4c46 | |||
a0b75bac46 | |||
489740848f | |||
b2aa38877b | |||
51703f00fc | |||
f1716a2767 | |||
5640bd963d | |||
8bb69beb84 | |||
76afeedc33 | |||
16b6223ba9 | |||
1b88c2c9d8 | |||
b254d4a9c9 | |||
2ed475f1ef | |||
3a5100097a | |||
15b3fe65c1 | |||
da6face95e | |||
a31cef6eb1 | |||
a005281f4f | |||
907c694834 | |||
8c392e94f2 | |||
d538274a0f | |||
beeea8dc0e | |||
53b0507eb2 | |||
a1a5b3d49f | |||
f275f88396 | |||
1345164ac3 |
@ -219,7 +219,7 @@ docker-compose up -d nginx mysql
|
||||
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`.
|
||||
|
||||
|
||||
**说明**: `workspace` 和 `php-fpm` 将运行在大部分实例中, 所有不用在命令中 `up`加上它们.
|
||||
**说明**: `workspace` 和 `php-fpm` 将运行在大部分实例中, 所以不需要在 `up` 命令中加上它们.
|
||||
|
||||
|
||||
|
||||
|
48
README.md
48
README.md
@ -23,7 +23,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
|
||||
- [Chinese](https://github.com/LaraDock/laradock/blob/master/README-zh.md)
|
||||
- [Intro](#Intro)
|
||||
- [Features](#features)
|
||||
- [Supported Software's](#Supported-Containers)
|
||||
- [Supported Software](#Supported-Containers)
|
||||
- [What is Docker](#what-is-docker)
|
||||
- [What is Laravel](#what-is-laravel)
|
||||
- [Why Docker not Vagrant](#why-docker-not-vagrant)
|
||||
@ -41,7 +41,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
|
||||
- [Edit default container configuration](#Edit-Container)
|
||||
- [Edit a Docker Image](#Edit-a-Docker-Image)
|
||||
- [Build/Re-build Containers](#Build-Re-build-Containers)
|
||||
- [Add more Software's (Docker Images)](#Add-Docker-Images)
|
||||
- [Add more Software (Docker Images)](#Add-Docker-Images)
|
||||
- [View the Log files](#View-the-Log-files)
|
||||
- [Laravel](#Laravel):
|
||||
- [Install Laravel from a Docker Container](#Install-Laravel)
|
||||
@ -50,6 +50,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
|
||||
- [Use Mongo](#Use-Mongo)
|
||||
- [Use phpMyAdmin](#Use-phpMyAdmin)
|
||||
- [Use pgAdmin](#Use-pgAdmin)
|
||||
- [Use ElasticSearch](#Use-ElasticSearch)
|
||||
- [PHP](#PHP)
|
||||
- [Install PHP Extensions](#Install-PHP-Extensions)
|
||||
- [Change the PHP-FPM Version](#Change-the-PHP-FPM-Version)
|
||||
@ -96,7 +97,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red
|
||||
|
||||
- Easy switch between PHP versions: 7.0, 5.6, 5.5...
|
||||
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
|
||||
- Run your own combination of software's: Memcached, HHVM, Beanstalkd...
|
||||
- Run your own combination of software: Memcached, HHVM, Beanstalkd...
|
||||
- Every software runs on a separate container: PHP-FPM, NGINX, PHP-CLI...
|
||||
- Easy to customize any container, with simple edit to the `dockerfile`.
|
||||
- All Images extends from an official base Image. (Trusted base Images).
|
||||
@ -110,7 +111,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red
|
||||
|
||||
|
||||
<a name="Supported-Containers"></a>
|
||||
### Supported Software's (Containers)
|
||||
### Supported Software (Containers)
|
||||
|
||||
- **Database Engines:**
|
||||
- MySQL
|
||||
@ -134,8 +135,9 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red
|
||||
- RabbitMQ (+ RabbitMQ Console)
|
||||
- **Tools:**
|
||||
- Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...)
|
||||
- phpMyAdmin
|
||||
- pgAdmin
|
||||
- PhpMyAdmin
|
||||
- PgAdmin
|
||||
- ElasticSearch
|
||||
|
||||
|
||||
>If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :)
|
||||
@ -187,7 +189,7 @@ Running a virtual Container is much faster than running a full virtual Machine.
|
||||
|
||||
What's better than a **Demo Video**:
|
||||
|
||||
- LaraDock v4.0 (Coming soon..)
|
||||
- LaraDock v4.* (Coming soon..)
|
||||
- LaraDock [v2.2](https://www.youtube.com/watch?v=-DamFMczwDA)
|
||||
- LaraDock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
||||
- LaraDock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
|
||||
@ -253,7 +255,7 @@ docker-compose up -d nginx mysql
|
||||
|
||||
You can select your own combination of Containers form the list below:
|
||||
|
||||
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`.
|
||||
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`, `elasticsearch`.
|
||||
|
||||
|
||||
**Note**: `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command.
|
||||
@ -267,6 +269,12 @@ You can select your own combination of Containers form the list below:
|
||||
docker-compose exec workspace bash
|
||||
```
|
||||
<br />
|
||||
<br>
|
||||
2a - Alternatively, Windows Powershell users can execute the following command to enter a running container.
|
||||
```bash
|
||||
docker exec -it {container-id} bash
|
||||
```
|
||||
<br />
|
||||
Add `--user=laradock` (example `docker-compose exec --user=laradock workspace bash`) to have files created as your host's user. (you can change the PUID (User id) and PGID (group id) variables from the `docker-compose.yml`).
|
||||
|
||||
|
||||
@ -456,7 +464,7 @@ You might use the `--no-cache` option if you want full rebuilding (`docker-compo
|
||||
|
||||
<br>
|
||||
<a name="Add-Docker-Images"></a>
|
||||
### Add more Software's (Docker Images)
|
||||
### Add more Software (Docker Images)
|
||||
|
||||
To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/).
|
||||
|
||||
@ -741,6 +749,19 @@ docker-compose up -d postgres pgadmin
|
||||
2 - Open your browser and visit the localhost on port **5050**: `http://localhost:5050`
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-ElasticSearch"></a>
|
||||
### Use ElasticSearch
|
||||
|
||||
1 - Run the ElasticSearch Container (`elasticsearch`) with the `docker-compose up` command. Example:
|
||||
|
||||
```bash
|
||||
docker-compose up -d elasticsearch
|
||||
```
|
||||
|
||||
2 - Open your browser and visit the localhost on port **9200**: `http://localhost:9200`
|
||||
|
||||
|
||||
<br>
|
||||
<a name="PHP"></a>
|
||||
|
||||
@ -1123,12 +1144,15 @@ For special help with Docker and/or Laravel, you can schedule a live call with t
|
||||
|
||||
## Credits
|
||||
|
||||
**Creator:**
|
||||
**Admins:**
|
||||
|
||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) (Twitter [@Mahmoud_Zalt](https://twitter.com/Mahmoud_Zalt))
|
||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) **Creator** (Twitter [@Mahmoud_Zalt](https://twitter.com/Mahmoud_Zalt))
|
||||
- [Bo-Yi Wu (appleboy)](https://github.com/appleboy)
|
||||
|
||||
**Main Contributors:**
|
||||
|
||||
- [Francis Lavoie (francislavoie)](https://github.com/francislavoie)
|
||||
- [luciano-jr](https://github.com/luciano-jr)
|
||||
- [Zhqagp](https://github.com/zhqagp)
|
||||
- [Tim B (tjb328)](https://github.com/tjb328)
|
||||
- [MidasCodeBreaker](https://github.com/midascodebreaker)
|
||||
@ -1139,7 +1163,6 @@ For special help with Docker and/or Laravel, you can schedule a live call with t
|
||||
- [Eric Pfeiffer (computerfr33k)](https://github.com/computerfr33k)
|
||||
- [Orette](https://github.com/orette)
|
||||
- [Jack Fletcher (Kauhat)](https://github.com/Kauhat)
|
||||
- [Bo-Yi Wu (appleboy)](https://github.com/appleboy)
|
||||
- [Amin Mkh (AminMkh)](https://github.com/AminMkh)
|
||||
- [Matthew Tonkin Dunn (mattythebatty)](https://github.com/mattythebatty)
|
||||
- [Zhivitsa Kirill (zhikiri)](https://github.com/zhikiri)
|
||||
@ -1150,7 +1173,6 @@ For special help with Docker and/or Laravel, you can schedule a live call with t
|
||||
- [Contributors](https://github.com/LaraDock/laradock/graphs/contributors)
|
||||
- [Supporters](https://github.com/LaraDock/laradock/issues?utf8=%E2%9C%93&q=)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT)
|
||||
|
@ -104,8 +104,6 @@ services:
|
||||
build: ./mysql
|
||||
volumes_from:
|
||||
- volumes_data
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_DATABASE: homestead
|
||||
MYSQL_USER: homestead
|
||||
@ -131,8 +129,6 @@ services:
|
||||
build: ./mariadb
|
||||
volumes_from:
|
||||
- volumes_data
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_DATABASE: homestead
|
||||
MYSQL_USER: homestead
|
||||
@ -234,6 +230,7 @@ services:
|
||||
build: ./caddy
|
||||
volumes_from:
|
||||
- volumes_source
|
||||
- volumes_data
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
@ -272,6 +269,18 @@ services:
|
||||
links:
|
||||
- postgres
|
||||
|
||||
### ElasticSearch Container ##################################
|
||||
|
||||
elasticsearch:
|
||||
build: ./elasticsearch
|
||||
volumes_from:
|
||||
- volumes_data
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
links:
|
||||
- php-fpm
|
||||
|
||||
### Laravel Application Code Container ######################
|
||||
|
||||
volumes_source:
|
||||
@ -295,5 +304,7 @@ services:
|
||||
- ./data/mongo:/data/db
|
||||
- ./data/aerospike:/opt/aerospike/data
|
||||
- ./data/sessions:/sessions
|
||||
- ./data/caddy:/root/.caddy
|
||||
- ./data/elasticsearch/data:/usr/share/elasticsearch/data
|
||||
|
||||
### Add more Containers below ###############################
|
||||
|
5
elasticsearch/Dockerfile
Normal file
5
elasticsearch/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM elasticsearch:latest
|
||||
|
||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
||||
|
||||
EXPOSE 9200 9300
|
@ -2,6 +2,8 @@ FROM mysql:latest
|
||||
|
||||
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||
|
||||
ADD my.cnf /etc/mysql/conf.d/my.cnf
|
||||
|
||||
CMD ["mysqld"]
|
||||
|
||||
EXPOSE 3306
|
||||
|
6
mysql/my.cnf
Normal file
6
mysql/my.cnf
Normal file
@ -0,0 +1,6 @@
|
||||
# The MySQL Client configuration file.
|
||||
#
|
||||
# For explanations see
|
||||
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
|
||||
|
||||
[mysql]
|
@ -114,6 +114,9 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||
docker-php-ext-enable opcache \
|
||||
;fi
|
||||
|
||||
# Copy opcache configration
|
||||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
# Final Touch
|
||||
|
@ -125,6 +125,8 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \
|
||||
docker-php-ext-enable opcache \
|
||||
;fi
|
||||
|
||||
# Copy opcache configration
|
||||
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
|
||||
#
|
||||
@ -144,4 +146,4 @@ WORKDIR /var/www/laravel
|
||||
|
||||
CMD ["php-fpm"]
|
||||
|
||||
EXPOSE 9000
|
||||
EXPOSE 9000
|
||||
|
7
php-fpm/opcache.ini
Normal file
7
php-fpm/opcache.ini
Normal file
@ -0,0 +1,7 @@
|
||||
extension=opcache.so
|
||||
opcache.enable="1"
|
||||
opcache.memory_consumption="256"
|
||||
opcache.use_cwd="0"
|
||||
opcache.fast_shutdown="1"
|
||||
opcache.max_file_size="0"
|
||||
opcache.validate_timestamps="0"
|
@ -1,12 +1,5 @@
|
||||
#
|
||||
# RabbitMQ Dockerfile
|
||||
#
|
||||
# https://github.com/dockerfile/rabbitmq
|
||||
#
|
||||
|
||||
# Pull base image.
|
||||
FROM rabbitmq
|
||||
|
||||
RUN rabbitmq-plugins enable --offline rabbitmq_management
|
||||
|
||||
EXPOSE 15671 15672
|
||||
EXPOSE 15671 15672
|
||||
|
@ -154,7 +154,7 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
nvm install ${NODE_VERSION} && \
|
||||
nvm use ${NODE_VERSION} && \
|
||||
nvm alias ${NODE_VERSION} && \
|
||||
npm install -g gulp bower \
|
||||
npm install -g gulp bower vue-cli \
|
||||
;fi
|
||||
|
||||
# Wouldn't execute when added to the RUN statement in the above block
|
||||
@ -165,6 +165,14 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
# Add NVM binaries to root's .bashrc
|
||||
USER root
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
echo "" >> ~/.bashrc && \
|
||||
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
|
||||
;fi
|
||||
|
||||
#####################################
|
||||
# PHP Aerospike:
|
||||
#####################################
|
||||
@ -186,6 +194,9 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
|
||||
) \
|
||||
&& rm /tmp/aerospike-client-php.tar.gz \
|
||||
;fi
|
||||
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
|
||||
rm /etc/php/7.0/cli/conf.d/aerospike.ini \
|
||||
;fi
|
||||
|
||||
#
|
||||
#--------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user