Merge branch 'master' of github.com:laradock/laradock
* 'master' of github.com:laradock/laradock: format the readme.md file fix travis ci hugo job get "cannot create directory" error. fixed #1068 update some `guide` format in the documentation
This commit is contained in:
commit
a365425c73
|
@ -1,12 +1,26 @@
|
||||||
![](https://s19.postimg.org/jblfytw9f/laradock-logo.jpg)
|
<p align="center">
|
||||||
|
<img src="https://s19.postimg.org/jblfytw9f/laradock-logo.jpg" alt="Laradock Logo"/>
|
||||||
|
</p>
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/laradock/laradock.svg?branch=master)](https://travis-ci.org/laradock/laradock) [![GitHub issues](https://img.shields.io/github/issues/laradock/laradock.svg)](https://github.com/laradock/laradock/issues) [![GitHub forks](https://img.shields.io/github/forks/laradock/laradock.svg)](https://github.com/laradock/laradock/network) [![GitHub stars](https://img.shields.io/github/stars/laradock/laradock.svg)](https://github.com/laradock/laradock/stargazers) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/laradock/laradock/master/LICENSE)
|
<p align="center">A Docker PHP development environment that facilitates running PHP Apps on Docker</p>
|
||||||
|
|
||||||
> Use Docker first and learn about it later.
|
<p align="center">
|
||||||
|
<a href="https://travis-ci.org/laradock/laradock"><img src="https://travis-ci.org/laradock/laradock.svg?branch=master" alt="Build status"></a>
|
||||||
|
<a href="https://github.com/laradock/laradock/stargazers"><img src="https://img.shields.io/github/stars/laradock/laradock.svg" alt="GitHub stars"></a>
|
||||||
|
<a href="https://github.com/laradock/laradock/network"><img src="https://img.shields.io/github/forks/laradock/laradock.svg" alt="GitHub forks"></a>
|
||||||
|
<a href="https://github.com/laradock/laradock/issues"><img src="https://img.shields.io/github/issues/laradock/laradock.svg" alt="GitHub issues"></a>
|
||||||
|
<a href="https://raw.githubusercontent.com/laradock/laradock/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license"></a>
|
||||||
|
<a href="http://laradock.io/contributing"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="contributions welcome"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
A Docker PHP development environment that facilitates running **PHP** Apps on **Docker**.
|
<h4 align="center" style="color:#7d58c2">Use Docker First And Learn About It Later</h4>
|
||||||
|
|
||||||
[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me)
|
<p align="center">
|
||||||
|
<a href="https://zalt.me"><img src="http://forthebadge.com/images/badges/built-by-developers.svg" alt="forthebadge" width="240" ></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
@ -14,8 +28,6 @@ A Docker PHP development environment that facilitates running **PHP** Apps on **
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
**Maintainers:**
|
|
||||||
|
|
||||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) @mahmoudz | [Twitter](https://twitter.com/Mahmoud_Zalt) | [Site](http://zalt.me)
|
- [Mahmoud Zalt](https://github.com/Mahmoudz) @mahmoudz | [Twitter](https://twitter.com/Mahmoud_Zalt) | [Site](http://zalt.me)
|
||||||
- [Bo-Yi Wu](https://github.com/appleboy) @appleboy | [Twitter](https://twitter.com/appleboy)
|
- [Bo-Yi Wu](https://github.com/appleboy) @appleboy | [Twitter](https://twitter.com/appleboy)
|
||||||
- [Philippe Trépanier](https://github.com/philtrep) @philtrep
|
- [Philippe Trépanier](https://github.com/philtrep) @philtrep
|
||||||
|
@ -31,4 +43,4 @@ A Docker PHP development environment that facilitates running **PHP** Apps on **
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT)
|
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE)
|
||||||
|
|
|
@ -326,6 +326,7 @@ Set the following variables:
|
||||||
- `laradock/php-fpm/xdebug.ini`
|
- `laradock/php-fpm/xdebug.ini`
|
||||||
|
|
||||||
Set the following variables:
|
Set the following variables:
|
||||||
|
|
||||||
```
|
```
|
||||||
xdebug.remote_autostart=1
|
xdebug.remote_autostart=1
|
||||||
xdebug.remote_enable=1
|
xdebug.remote_enable=1
|
||||||
|
@ -336,21 +337,25 @@ xdebug.cli_color=1
|
||||||
|
|
||||||
<a name="InstallCleanHouse"></a>
|
<a name="InstallCleanHouse"></a>
|
||||||
### Need to clean house first?
|
### Need to clean house first?
|
||||||
|
|
||||||
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
||||||
Here are a few things I use to clean things up.
|
Here are a few things I use to clean things up.
|
||||||
|
|
||||||
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
|
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
|
||||||
|
|
||||||
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
|
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
|
||||||
|
|
||||||
- Delete all images containing `laradock`.
|
- Delete all images containing `laradock`.
|
||||||
|
|
||||||
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
|
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
|
||||||
**Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
|
**Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
|
||||||
**Note:** Some may fail with:
|
**Note:** Some may fail with:
|
||||||
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
||||||
|
|
||||||
- I added this to my `.bashrc` to remove orphaned images.
|
- I added this to my `.bashrc` to remove orphaned images.
|
||||||
```
|
|
||||||
dclean() {
|
```
|
||||||
|
dclean() {
|
||||||
processes=`docker ps -q -f status=exited`
|
processes=`docker ps -q -f status=exited`
|
||||||
if [ -n "$processes" ]; thend
|
if [ -n "$processes" ]; thend
|
||||||
docker rm $processes
|
docker rm $processes
|
||||||
|
@ -360,10 +365,11 @@ Here are a few things I use to clean things up.
|
||||||
if [ -n "$images" ]; then
|
if [ -n "$images" ]; then
|
||||||
docker rmi $images
|
docker rmi $images
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
|
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
|
||||||
|
|
||||||
```
|
```
|
||||||
# remove laravel* containers
|
# remove laravel* containers
|
||||||
# remove laravel_* images
|
# remove laravel_* images
|
||||||
|
@ -406,14 +412,14 @@ laradock_php-fpm_1 php-fpm Up 9000/tcp
|
||||||
laradock_volumes_data_1 true Exit 0
|
laradock_volumes_data_1 true Exit 0
|
||||||
laradock_volumes_source_1 true Exit 0
|
laradock_volumes_source_1 true Exit 0
|
||||||
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
|
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="enablePhpXdebug"></a>
|
<a name="enablePhpXdebug"></a>
|
||||||
## Enable xDebug on php-fpm
|
## Enable xDebug on php-fpm
|
||||||
|
|
||||||
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
||||||
You should see something like the following:
|
You should see something like the following:
|
||||||
|
|
||||||
```
|
```
|
||||||
xDebug status
|
xDebug status
|
||||||
laradock_php-fpm_1
|
laradock_php-fpm_1
|
||||||
|
@ -422,6 +428,7 @@ Copyright (c) 1997-2016 The PHP Group
|
||||||
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
||||||
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
||||||
```
|
```
|
||||||
|
|
||||||
Other commands include `.php-fpm/xdebug start | stop`.
|
Other commands include `.php-fpm/xdebug start | stop`.
|
||||||
|
|
||||||
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
|
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
|
||||||
|
@ -430,6 +437,7 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
|
||||||
|
|
||||||
<a name="InstallPHPStormConfigs"></a>
|
<a name="InstallPHPStormConfigs"></a>
|
||||||
## PHPStorm Settings
|
## PHPStorm Settings
|
||||||
|
|
||||||
- Here are some settings that are known to work:
|
- Here are some settings that are known to work:
|
||||||
- `Settings/BuildDeploymentConnection`
|
- `Settings/BuildDeploymentConnection`
|
||||||
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
|
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
|
||||||
|
|
|
@ -26,7 +26,7 @@ if [ -n "${HUGO_VERSION}" ]; then
|
||||||
|
|
||||||
# Download hugo binary
|
# Download hugo binary
|
||||||
curl -L https://github.com/spf13/hugo/releases/download/v$HUGO_VERSION/$HUGO_PACKAGE.tar.gz | tar xz
|
curl -L https://github.com/spf13/hugo/releases/download/v$HUGO_VERSION/$HUGO_PACKAGE.tar.gz | tar xz
|
||||||
mkdir $HOME/bin
|
mkdir -p $HOME/bin
|
||||||
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
|
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
|
||||||
|
|
||||||
# Remove existing docs
|
# Remove existing docs
|
||||||
|
|
|
@ -202,6 +202,8 @@ ENV DRUSH_VERSION 8.1.2
|
||||||
ARG INSTALL_DRUSH=false
|
ARG INSTALL_DRUSH=false
|
||||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
# Install Drush 8 with the phar file.
|
# Install Drush 8 with the phar file.
|
||||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
||||||
chmod +x /usr/local/bin/drush && \
|
chmod +x /usr/local/bin/drush && \
|
||||||
|
|
|
@ -202,6 +202,8 @@ ENV DRUSH_VERSION 8.1.2
|
||||||
ARG INSTALL_DRUSH=false
|
ARG INSTALL_DRUSH=false
|
||||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
# Install Drush 8 with the phar file.
|
# Install Drush 8 with the phar file.
|
||||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
||||||
chmod +x /usr/local/bin/drush && \
|
chmod +x /usr/local/bin/drush && \
|
||||||
|
|
|
@ -199,6 +199,8 @@ ENV DRUSH_VERSION 8.1.2
|
||||||
ARG INSTALL_DRUSH=false
|
ARG INSTALL_DRUSH=false
|
||||||
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
|
||||||
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
RUN if [ ${INSTALL_DRUSH} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
|
apt-get -y install mysql-client && \
|
||||||
# Install Drush 8 with the phar file.
|
# Install Drush 8 with the phar file.
|
||||||
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \
|
||||||
chmod +x /usr/local/bin/drush && \
|
chmod +x /usr/local/bin/drush && \
|
||||||
|
|
Loading…
Reference in New Issue