diff --git a/.github/README.md b/.github/README.md index e7cf945c..29ab0749 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,12 +1,26 @@ -![](https://s19.postimg.org/jblfytw9f/laradock-logo.jpg) +

+ Laradock Logo +

-[![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) +

A Docker PHP development environment that facilitates running PHP Apps on Docker

-> Use Docker first and learn about it later. +

+ Build status + GitHub stars + GitHub forks + GitHub issues + GitHub license + contributions welcome +

-A Docker PHP development environment that facilitates running **PHP** Apps on **Docker**. +

Use Docker First And Learn About It Later

-[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me) +

+ forthebadge +

+ + +--- ## Documentation @@ -14,8 +28,6 @@ A Docker PHP development environment that facilitates running **PHP** Apps on ** ## Credits -**Maintainers:** - - [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) - [Philippe Trépanier](https://github.com/philtrep) @philtrep @@ -31,4 +43,4 @@ A Docker PHP development environment that facilitates running **PHP** Apps on ** ## License -[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT) +[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) diff --git a/DOCUMENTATION/content/guides/index.md b/DOCUMENTATION/content/guides/index.md index ffc0c3e6..e7de20a4 100644 --- a/DOCUMENTATION/content/guides/index.md +++ b/DOCUMENTATION/content/guides/index.md @@ -326,6 +326,7 @@ Set the following variables: - `laradock/php-fpm/xdebug.ini` Set the following variables: + ``` xdebug.remote_autostart=1 xdebug.remote_enable=1 @@ -336,34 +337,39 @@ xdebug.cli_color=1 ### Need to clean house first? + 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. - 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 {}` - Delete all images containing `laradock`. + `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:** Some may fail with: `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. - ``` - dclean() { - processes=`docker ps -q -f status=exited` - if [ -n "$processes" ]; thend - docker rm $processes - fi - images=`docker images -q -f dangling=true` - if [ -n "$images" ]; then - docker rmi $images - fi - } - ``` +``` +dclean() { + processes=`docker ps -q -f status=exited` + if [ -n "$processes" ]; thend + docker rm $processes + fi + + images=`docker images -q -f dangling=true` + if [ -n "$images" ]; then + docker rmi $images + fi +} +``` - 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_* images @@ -406,14 +412,14 @@ laradock_php-fpm_1 php-fpm Up 9000/tcp laradock_volumes_data_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 - - ``` ## Enable xDebug on php-fpm + In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status` You should see something like the following: + ``` xDebug status 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 with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans ``` + 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 @@ -430,6 +437,7 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will ## PHPStorm Settings + - Here are some settings that are known to work: - `Settings/BuildDeploymentConnection` - ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png) diff --git a/travis-build.sh b/travis-build.sh index 9d47e09b..c72f51df 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -26,7 +26,7 @@ if [ -n "${HUGO_VERSION}" ]; then # Download hugo binary 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 # Remove existing docs diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index 076eda32..d844b392 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -202,6 +202,8 @@ ENV DRUSH_VERSION 8.1.2 ARG INSTALL_DRUSH=false ENV INSTALL_DRUSH ${INSTALL_DRUSH} RUN if [ ${INSTALL_DRUSH} = true ]; then \ + apt-get update -yqq && \ + apt-get -y install mysql-client && \ # 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 && \ chmod +x /usr/local/bin/drush && \ diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 3751c7ac..c55e2971 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -202,6 +202,8 @@ ENV DRUSH_VERSION 8.1.2 ARG INSTALL_DRUSH=false ENV INSTALL_DRUSH ${INSTALL_DRUSH} RUN if [ ${INSTALL_DRUSH} = true ]; then \ + apt-get update -yqq && \ + apt-get -y install mysql-client && \ # 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 && \ chmod +x /usr/local/bin/drush && \ diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index c66befb5..350bb621 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -199,6 +199,8 @@ ENV DRUSH_VERSION 8.1.2 ARG INSTALL_DRUSH=false ENV INSTALL_DRUSH ${INSTALL_DRUSH} RUN if [ ${INSTALL_DRUSH} = true ]; then \ + apt-get update -yqq && \ + apt-get -y install mysql-client && \ # 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 && \ chmod +x /usr/local/bin/drush && \