From 881cbfb8c255a0b5753756dcd96cebb69f22a5f4 Mon Sep 17 00:00:00 2001 From: Taufek Johar Date: Thu, 28 Sep 2017 17:59:16 +0800 Subject: [PATCH 1/9] Install Dependencies to Run Dusk Tests **Why we need this change?** Currently we are unable to run Dusk (Browser) tests in workspace container. This change, is to allow us to install all dependencies needed to run Dust test which consists of 1. Linux packages such as xvfb (x-virtual frame buffer to run browser in headless container) and etc. 2. Chrome browser. 3. Chrome driver. To install the Dusk dependencies. 1. Update `WORKSPACE_INSTALL_DUSK_DEPS` to true. 2. Run `docker-compose build workspace`. I've also added couple of aliases to facilitate the preparation of test environment. 1. xvfb = `Xvfb -ac :0 -screen 0 1024x768x16 &` (run x-virtual frame buffer in the background) 2. serve = `php artisan serve --quiet &` (run laravel app in the background) Once those are installed, we will need to update the default chrome driver argument in Laravel 5.5 from `--headless` to `sandbox`. Below are the steps to run Dusk in workspace. 1. `docker-compose run workspace bash` (get into workspace). 2. `laravel new dusk-test` (generate new lavarel app for testing purpose). 3. `cd dusk-test` (change directory to newly generate app folder). 4. `composer install --dev laravel/dusk` (install dusk via composer). 5. `php artisan dusk:install` (generate dusk files). 6. `sed -i '/APP_URL/d' .env` (remove APP_URL entry in .env) 7. `echo 'APP_URL=localhost:8000' >> .env` (add new APP_URL entry in .env) 8. `sed -i--'s/headless/no-sandbox/g' tests/DuskTestCase.php` (replace the default chrome driver argument). 9. `xvfb` (alias to run Xvfb instance in the background). 10. `serve` (alias to run laravel app in the background). 11. `dusk` (alias to run Dusk test). --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile-56 | 29 +++++++++++++++++++++++++++++ workspace/Dockerfile-70 | 29 +++++++++++++++++++++++++++++ workspace/Dockerfile-71 | 29 +++++++++++++++++++++++++++++ workspace/aliases.sh | 4 ++++ 6 files changed, 93 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index f3f34e20..75c848f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,6 +40,7 @@ services: - INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK} - INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM} + - INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS} - PUID=${WORKSPACE_PUID} - PGID=${WORKSPACE_PGID} - NODE_VERSION=${WORKSPACE_NODE_VERSION} diff --git a/env-example b/env-example index 2fd338bd..33c773e2 100644 --- a/env-example +++ b/env-example @@ -53,6 +53,7 @@ WORKSPACE_INSTALL_PYTHON=false WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false WORKSPACE_INSTALL_IMAGEMAGICK=false WORKSPACE_INSTALL_TERRAFORM=false +WORKSPACE_INSTALL_DUSK_DEPS=false WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 WORKSPACE_NODE_VERSION=stable diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index f70fc829..9ccb62c7 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -525,6 +525,35 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \ && rm terraform_0.10.6_linux_amd64.zip \ ;fi +##################################### +# Dusk Dependencies: +##################################### +USER root +ARG INSTALL_DUSK_DEPS=false +ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS} +RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ + # Install required packages + add-apt-repository ppa:ondrej/php \ + && apt-get update \ + && apt-get -y install zip wget unzip xdg-utils \ + libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \ + gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \ + xfonts-base xfonts-scalable x11-apps \ + + # Install Google Chrome + && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ + && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ + && apt-get -y -f install \ + && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ + && rm google-chrome-stable_current_amd64.deb \ + + # Install Chrome Driver + && wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \ + && unzip chromedriver_linux64.zip \ + && mv chromedriver /usr/local/bin/ \ + && rm chromedriver_linux64.zip \ +;fi + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 819d88d5..0daa29fa 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -618,6 +618,35 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \ && rm terraform_0.10.6_linux_amd64.zip \ ;fi +##################################### +# Dusk Dependencies: +##################################### +USER root +ARG INSTALL_DUSK_DEPS=false +ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS} +RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ + # Install required packages + add-apt-repository ppa:ondrej/php \ + && apt-get update \ + && apt-get -y install zip wget unzip xdg-utils \ + libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \ + gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \ + xfonts-base xfonts-scalable x11-apps \ + + # Install Google Chrome + && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ + && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ + && apt-get -y -f install \ + && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ + && rm google-chrome-stable_current_amd64.deb \ + + # Install Chrome Driver + && wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \ + && unzip chromedriver_linux64.zip \ + && mv chromedriver /usr/local/bin/ \ + && rm chromedriver_linux64.zip \ +;fi + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 383689d6..533b72f7 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -624,6 +624,35 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \ && rm terraform_0.10.6_linux_amd64.zip \ ;fi +##################################### +# Dusk Dependencies: +##################################### +USER root +ARG INSTALL_DUSK_DEPS=false +ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS} +RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ + # Install required packages + add-apt-repository ppa:ondrej/php \ + && apt-get update \ + && apt-get -y install zip wget unzip xdg-utils \ + libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \ + gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \ + xfonts-base xfonts-scalable x11-apps \ + + # Install Google Chrome + && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ + && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ + && apt-get -y -f install \ + && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ + && rm google-chrome-stable_current_amd64.deb \ + + # Install Chrome Driver + && wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \ + && unzip chromedriver_linux64.zip \ + && mv chromedriver /usr/local/bin/ \ + && rm chromedriver_linux64.zip \ +;fi + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/aliases.sh b/workspace/aliases.sh index 3e9bbb6f..29fc22de 100644 --- a/workspace/aliases.sh +++ b/workspace/aliases.sh @@ -69,6 +69,7 @@ alias migrate="php artisan migrate" alias refresh="php artisan migrate:refresh" alias rollback="php artisan migrate:rollback" alias seed="php artisan:seed" +alias serve="php artisan serve --quiet &" alias phpunit="./vendor/bin/phpunit" alias pu="phpunit" @@ -88,6 +89,9 @@ alias reload="source ~/.aliases && echo \"$COL_GREEN ==> Aliases Reloaded... $CO alias run="npm run" alias tree="xtree" +# Xvfb +alias xvfb="Xvfb -ac :0 -screen 0 1024x768x16 &" + # requires installation of 'https://www.npmjs.com/package/npms-cli' alias npms="npms search" # requires installation of 'https://www.npmjs.com/package/package-menu-cli' From eeee14338fccfad363e3fa9d8dc55e15de8507a9 Mon Sep 17 00:00:00 2001 From: Taufek Johar Date: Fri, 6 Oct 2017 22:46:54 +0800 Subject: [PATCH 2/9] Move Chrome Driver Version to Env This will allow us to upgrade chrome driver easily. Set the default chrome driver to 2.32. Also remove the comment and empty line to avoid getting below warning: ``` [WARNING]: Empty continuation lines will become errors in a future release. ``` --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile-71 | 9 +++------ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 75c848f0..e0fee7de 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,6 +43,7 @@ services: - INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS} - PUID=${WORKSPACE_PUID} - PGID=${WORKSPACE_PGID} + - CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION} - NODE_VERSION=${WORKSPACE_NODE_VERSION} - YARN_VERSION=${WORKSPACE_YARN_VERSION} - TZ=${WORKSPACE_TIMEZONE} diff --git a/env-example b/env-example index 33c773e2..0fe6ddb8 100644 --- a/env-example +++ b/env-example @@ -56,6 +56,7 @@ WORKSPACE_INSTALL_TERRAFORM=false WORKSPACE_INSTALL_DUSK_DEPS=false WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 +WORKSPACE_CHROME_DRIVER_VERSION=2.32 WORKSPACE_NODE_VERSION=stable WORKSPACE_YARN_VERSION=latest WORKSPACE_TIMEZONE=UTC diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 533b72f7..ac47e4e6 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -628,26 +628,23 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \ # Dusk Dependencies: ##################################### USER root +ARG CHROME_DRIVER_VERSION=stable +ENV CHROME_DRIVER_VERSION ${CHROME_DRIVER_VERSION} ARG INSTALL_DUSK_DEPS=false ENV INSTALL_DUSK_DEPS ${INSTALL_DUSK_DEPS} RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ - # Install required packages add-apt-repository ppa:ondrej/php \ && apt-get update \ && apt-get -y install zip wget unzip xdg-utils \ libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 xvfb \ gtk2-engines-pixbuf xfonts-cyrillic xfonts-100dpi xfonts-75dpi \ xfonts-base xfonts-scalable x11-apps \ - - # Install Google Chrome && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ && apt-get -y -f install \ && dpkg -i --force-depends google-chrome-stable_current_amd64.deb \ && rm google-chrome-stable_current_amd64.deb \ - - # Install Chrome Driver - && wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \ + && wget https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip \ && unzip chromedriver_linux64.zip \ && mv chromedriver /usr/local/bin/ \ && rm chromedriver_linux64.zip \ From 98b2b2e47b79ee593c6d599fbf29fa02c76f0b19 Mon Sep 17 00:00:00 2001 From: Taufek Johar Date: Fri, 6 Oct 2017 16:13:33 +0800 Subject: [PATCH 3/9] Update Dusk Documentation Added new option on how to setup and run Dusk tests without Selenium. --- DOCUMENTATION/content/guides/index.md | 195 +++++++++++++++++++++++++- 1 file changed, 188 insertions(+), 7 deletions(-) diff --git a/DOCUMENTATION/content/guides/index.md b/DOCUMENTATION/content/guides/index.md index d166604c..ab744750 100644 --- a/DOCUMENTATION/content/guides/index.md +++ b/DOCUMENTATION/content/guides/index.md @@ -565,6 +565,187 @@ Assuming that you are in laradock folder, type: # Running Laravel Dusk Tests +- [Option 1: Without Selenium](#option1-dusk) +- [Option 2: With Selenium](#option2-dusk) + + +## Option 1: Without Selenium + +- [Intro](#option1-dusk-intro) +- [Workspace Setup](#option1-workspace-setup) +- [Application Setup](#option1-application-setup) +- [Choose Chrome Driver Version (Optional)](#option1-choose-chrome-driver-version) +- [Run Dusk Tests](#option1-run-dusk-tests) + + +### Intro + +This is a guide to run Dusk tests in your `workspace` container with headless +google-chrome and chromedriver. It has been tested with Laravel 5.4 and 5.5. + + +### Workspace Setup + +Update your .env with following entries: + +``` +... +# Install Laravel installer bin to setup demo app +WORKSPACE_INSTALL_LARAVEL_INSTALLER=true +... +# Install all the necessary dependencies for running Dusk tests +WORKSPACE_INSTALL_DUSK_DEPS=true +... +``` + +Then run below to build your workspace. + +``` +docker-compose build workspace +``` + + +### Application Setup + +Run a `workspace` container and you will be inside the container at `/var/www` directory. + +``` +docker-compose run workspace bash + +/var/www#> _ +``` + +Create new Laravel application named `dusk-test` and install Laravel Dusk package. + +``` +/var/www> laravel new dusk-test +/var/www> cd dusk-test +/var/www/dusk-test> composer require --dev laravel/dusk +/var/www/dusk-test> php artisan dusk:install +``` + +Create `.env.dusk.local` by copying from `.env` file. + +``` +/var/www/dusk-test> cp .env .env.dusk.local +``` + +Update the `APP_URL` entry in `.env.dusk.local` to local Laravel server. + +``` +APP_URL=http://localhost:8000 +``` + +You will need to run chromedriver with `headless` and `no-sandbox` flag. In Laravel Dusk 2.x it is +already set `headless` so you just need to add `no-sandbox` flag. If you on previous version 1.x, +you will need to update your `DustTestCase#driver` as shown below. + + +``` +addArguments([ + '--disable-gpu', + '--headless', + '--no-sandbox' + ]); + + return RemoteWebDriver::create( + 'http://localhost:9515', DesiredCapabilities::chrome()->setCapability( + ChromeOptions::CAPABILITY, $options + ) + ); + } +} +``` + + +### Choose Chrome Driver Version (Optional) + +You could choose to use either: + +1. Chrome Driver shipped with Laravel Dusk. (Default) +2. Chrome Driver installed in `workspace` container. (Required tweak on DuskTestCase class) + +For Laravel 2.x, you need to update `DuskTestCase#prepare` method if you wish to go with option #2. + +``` + +setPrefix('chromedriver') + ->getProcess() + ->setEnv(static::chromeEnvironment()); + } + + ... +} +``` + + +### Run Dusk Tests + +Run local server in `workspace` container and run Dusk tests. + +``` +# alias to run Laravel server in the background (php artisan serve --quiet &) +/var/www/dusk-test> serve +# alias to run Dusk tests (php artisan dusk) +/var/www/dusk-test> dusk + +PHPUnit 6.4.0 by Sebastian Bergmann and contributors. + +. 1 / 1 (100%) + +Time: 837 ms, Memory: 6.00MB +``` + + +## Option 2: With Selenium + - [Intro](#dusk-intro) - [DNS Setup](#dns-setup) - [Docker Compose Setup](#docker-compose) @@ -572,7 +753,7 @@ Assuming that you are in laradock folder, type: - [Running Laravel Dusk Tests](#running-tests) -## Intro +### Intro Setting up Laravel Dusk tests to run with Laradock appears be something that eludes most Laradock users. This guide is designed to show you how to wire them up to work together. This guide is written with macOS and Linux in mind. As such, @@ -583,7 +764,7 @@ This guide assumes you know how to use a DNS forwarder such as `dnsmasq` or are with editing the `/etc/hosts` file for one-off DNS changes. -## DNS Setup +### DNS Setup According to RFC-2606, only four TLDs are reserved for local testing[^1]: - `.test` @@ -617,7 +798,7 @@ This will ensure that when navigating to `myapp.test`, it will route the request to `127.0.0.1` which will be handled by Nginx in Laradock. -## Docker Compose setup +### Docker Compose setup In order to make the Selenium container talk to the Nginx container appropriately, the `docker-compose.yml` needs to be edited to accommodate this. Make the following changes: @@ -640,7 +821,7 @@ necessary for running Dusk tests. These changes also link the `nginx` environmen variable to the domain you wired up in your hosts file. -## Laravel Dusk Setup +### Laravel Dusk Setup In order to make Laravel Dusk make the proper request to the Selenium container, you have to edit the `DuskTestCase.php` file that's provided on the initial @@ -650,13 +831,13 @@ Remote Web Driver attempts to use to set up the Selenium session. One recommendation for this is to add a separate config option in your `.env.dusk.local` so it's still possible to run your Dusk tests locally should you want to. -### .env.dusk.local +#### .env.dusk.local ``` ... USE_SELENIUM=true ``` -### DuskTestCase.php +#### DuskTestCase.php ```php abstract class DuskTestCase extends BaseTestCase { @@ -677,7 +858,7 @@ abstract class DuskTestCase extends BaseTestCase ``` -## Running Laravel Dusk Tests +### Running Laravel Dusk Tests Now that you have everything set up, to run your Dusk tests, you have to SSH into the workspace container as you normally would: From 525c4313a02e7263ef22bd121fa8a0d7a6186dce Mon Sep 17 00:00:00 2001 From: zuohuadong Date: Wed, 11 Oct 2017 19:48:07 +0800 Subject: [PATCH 4/9] use caddy in Apache-2.0 see: https://caddyserver.com/products/licenses so, I use caddypulg, it is free --- caddy/Dockerfile | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/caddy/Dockerfile b/caddy/Dockerfile index d88fe390..8d8ade00 100644 --- a/caddy/Dockerfile +++ b/caddy/Dockerfile @@ -1,22 +1,17 @@ -FROM alpine:3.5 +FROM golang -MAINTAINER Eric Pfeiffer +ARG version="0.10.9" -ENV caddy_version=0.10.5 -ARG plugins=http.git +ARG plugins="git" -LABEL caddy_version="$caddy_version" architecture="amd64" +## If you come frome china, please ues it. -RUN apk update \ - && apk upgrade \ - && apk add --no-cache openssh-client git tar curl +# RUN echo "172.217.6.127 golang.org" >> /etc/hosts -RUN curl --silent --show-error --fail --location \ - --header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \ - "https://caddyserver.com/download/linux/amd64?plugins=${plugins}" \ - | tar --no-same-owner -C /usr/bin/ -xz caddy \ - && mv /usr/bin/caddy /usr/bin/caddy \ - && chmod 0755 /usr/bin/caddy +RUN go get github.com/abiosoft/caddyplug/caddyplug \ + && caddyplug install-caddy \ + && caddyplug install git +RUN caddy --version EXPOSE 80 443 2015 From 2bedfdd9d7cbb0510e13de71b1fb662ee98b12f9 Mon Sep 17 00:00:00 2001 From: Khoa Nguyen Date: Wed, 11 Oct 2017 18:08:24 -0700 Subject: [PATCH 5/9] fix typos in contributing --- DOCUMENTATION/content/contributing/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DOCUMENTATION/content/contributing/index.md b/DOCUMENTATION/content/contributing/index.md index 042a19a5..3c716558 100644 --- a/DOCUMENTATION/content/contributing/index.md +++ b/DOCUMENTATION/content/contributing/index.md @@ -14,7 +14,7 @@ If you have questions about how to use Laradock, please direct your questions to ## Found an Issue If have an issue or you found a typo in the documentation, you can help us by -opnening an [Issue](https://github.com/laradock/laradock/issues). +opening an [Issue](https://github.com/laradock/laradock/issues). **Steps to do before opening an Issue:** @@ -24,7 +24,7 @@ opnening an [Issue](https://github.com/laradock/laradock/issues). If your issue appears to be a bug, and hasn't been reported, then open a new issue. -*This Help us to maximize the effort we can spend fixing issues and adding new +*This helps us maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.* @@ -61,7 +61,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI ## Support new Software (Add new Container) -* Forke the repo and clone the code. +* Fork the repo and clone the code. * Create folder as the software name (example: `mysql` - `nginx`). @@ -81,7 +81,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI ## Edit supported Software (Edit a Container) -* Forke the repo and clone the code. +* Fork the repo and clone the code. * Open the software (container) folder (example: `mysql` - `nginx`). From f15bc8e6b723c36403e9b45a3a53419f4291e8be Mon Sep 17 00:00:00 2001 From: zuohuadong Date: Thu, 12 Oct 2017 18:37:26 +0800 Subject: [PATCH 6/9] update jenkins version update jenkins version to 2.73.2 update docker-compose version to 1.16.1 update TINI version to 0.16.1 --- jenkins/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index 63480c7c..cfcba23f 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -25,8 +25,8 @@ VOLUME /var/jenkins_home # or config file with your custom jenkins Docker image. RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d -ENV TINI_VERSION 0.13.2 -ENV TINI_SHA afbf8de8a63ce8e4f18cb3f34dfdbbd354af68a1 +ENV TINI_VERSION 0.16.1 +ENV TINI_SHA d1cb5d71adc01d47e302ea439d70c79bd0864288 # Use tini as subreaper in Docker container to adopt zombie processes RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \ @@ -36,10 +36,10 @@ COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groov # jenkins version being bundled in this docker image ARG JENKINS_VERSION -ENV JENKINS_VERSION ${JENKINS_VERSION:-2.32.3} +ENV JENKINS_VERSION ${JENKINS_VERSION:-2.73.2} # jenkins.war checksum, download will be validated using it -ARG JENKINS_SHA=a25b9a314ca9e76f9673da7309e1882e32674223 +ARG JENKINS_SHA=f6d1351beef34d980b32f8c463be505445f637e2fc62156fecd42891c53c97d3 # Can be used to customize where jenkins.war get downloaded from ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/${JENKINS_VERSION}/jenkins-war-${JENKINS_VERSION}.war @@ -47,7 +47,7 @@ ARG JENKINS_URL=https://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-w # could use ADD but this one does not check Last-Modified header neither does it allow to control checksum # see https://github.com/docker/docker/issues/8331 RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \ - && echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha1sum -c - + && echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" | sha256sum -c - ENV JENKINS_UC https://updates.jenkins.io RUN chown -R ${user} "$JENKINS_HOME" /usr/share/jenkins/ref @@ -71,7 +71,7 @@ RUN apt-get install -y curl && curl -sSL https://get.docker.com/ | sh RUN usermod -aG docker jenkins # Install Docker-Compose -RUN curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +RUN curl -L "https://github.com/docker/compose/releases/download/1.16.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose RUN chmod +x /usr/local/bin/docker-compose From 1702a5cc09b06a74cf87a4924b0959cb631ea2e5 Mon Sep 17 00:00:00 2001 From: zuohuadong Date: Thu, 12 Oct 2017 18:40:12 +0800 Subject: [PATCH 7/9] rm version --- caddy/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddy/Dockerfile b/caddy/Dockerfile index 8d8ade00..aca00cdb 100644 --- a/caddy/Dockerfile +++ b/caddy/Dockerfile @@ -1,6 +1,6 @@ FROM golang -ARG version="0.10.9" +MAINTAINER Huadong Zuo ARG plugins="git" From dff0e82ddb0d769a37489735d66593c2cfaaf08c Mon Sep 17 00:00:00 2001 From: zuohuadong Date: Thu, 12 Oct 2017 18:42:11 +0800 Subject: [PATCH 8/9] alpine be quckly alpine be quckly --- postgres/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 56a4ddb8..423c5d6b 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -1,7 +1,7 @@ -FROM postgres:latest +FROM postgres:alpine MAINTAINER Ben M CMD ["postgres"] -EXPOSE 5432 \ No newline at end of file +EXPOSE 5432 From 8e556008d883a953a9068347a1e5344c9d385ba4 Mon Sep 17 00:00:00 2001 From: Maxime Helias Date: Sat, 14 Oct 2017 20:01:16 +0200 Subject: [PATCH 9/9] Add MailDev Container --- .travis.yml | 6 +++--- DOCUMENTATION/content/introduction/index.md | 2 +- docker-compose.yml | 11 +++++++++++ env-example | 5 +++++ maildev/Dockerfile | 5 +++++ 5 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 maildev/Dockerfile diff --git a/.travis.yml b/.travis.yml index f54fc735..887b61ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,9 +33,9 @@ env: - PHP_VERSION=70 BUILD_SERVICE=aerospike - PHP_VERSION=71 BUILD_SERVICE=aerospike - - PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer" - - PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer" - - PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer" + - PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer" + - PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer" + - PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 balancer" - HUGO_VERSION=0.20.2 diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 115a79c6..58e35680 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker - **Queueing Management:** Beanstalkd Console - RabbitMQ Console - **Random Tools:** -HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Mailhog - Minio - Varnish - Swoole - Laravel Echo... +HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Mailhog - MailDev - Minio - Varnish - Swoole - Laravel Echo... Laradock introduces the **Workspace** Image, as a development environment. It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose. diff --git a/docker-compose.yml b/docker-compose.yml index e0fee7de..ae47a28d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -550,6 +550,17 @@ services: - frontend - backend +### MailDev Container ####################################### + + maildev: + build: ./maildev + ports: + - "${MAILDEV_HTTP_PORT}:80" + - "${MAILDEV_SMTP_PORT}:25" + networks: + - frontend + - backend + ### Selenium Container ######################################## selenium: diff --git a/env-example b/env-example index 0fe6ddb8..52cfb46f 100644 --- a/env-example +++ b/env-example @@ -205,6 +205,11 @@ PMA_PASSWORD=secret PMA_ROOT_PASSWORD=secret PMA_PORT=8080 +### MAILDEV ############################################################################################################ + +MAILDEV_HTTP_PORT=1080 +MAILDEV_SMTP_PORT=25 + ### VARNISH ############################################################################################################ VARNISH_CONFIG=/etc/varnish/default.vcl diff --git a/maildev/Dockerfile b/maildev/Dockerfile new file mode 100644 index 00000000..4484c832 --- /dev/null +++ b/maildev/Dockerfile @@ -0,0 +1,5 @@ +FROM djfarrelly/maildev + +MAINTAINER Maxime Hélias + +EXPOSE 80 25