From 4e7e003e871bd6843ccc96b4a33ebe2d64810c89 Mon Sep 17 00:00:00 2001 From: larryeitel Date: Wed, 17 Aug 2016 19:24:00 -0600 Subject: [PATCH 1/7] ssh keys --- docker-compose.yml | 1 + workspace/Dockerfile | 22 +++++++++++++++ workspace/insecure_id_rsa | 51 +++++++++++++++++++++++++++++++++++ workspace/insecure_id_rsa.pub | 1 + 4 files changed, 75 insertions(+) create mode 100644 workspace/insecure_id_rsa create mode 100644 workspace/insecure_id_rsa.pub diff --git a/docker-compose.yml b/docker-compose.yml index 8de42247..26318084 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,7 @@ services: - INSTALL_XDEBUG=false - INSTALL_NODE=false - COMPOSER_GLOBAL_INSTALL=false + - INSTALL_WORKSPACE_SSH=false - PUID=1000 - PGID=1000 volumes_from: diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 31d47ecf..8932aa25 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -55,6 +55,28 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # ADD for REMOTE debugging COPY ./xdebug_settings_only.ini /etc/php/7.0/cli/conf.d/xdebug_settings_only.ini + +##################################### +# ssh: +##################################### + +# Check if ssh needs to be installed +# See: https://github.com/phusion/baseimage-docker#enabling_ssh +ADD insecure_id_rsa /tmp/id_rsa +ADD insecure_id_rsa.pub /tmp/id_rsa.pub +ARG INSTALL_WORKSPACE_SSH=true +ENV INSTALL_WORKSPACE_SSH ${INSTALL_SSH} +RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ + rm -f /etc/service/sshd/down && \ + cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \ + && cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \ + && cat /tmp/id_rsa >> /root/.ssh/id_rsa \ + && rm -f /tmp/id_rsa* \ + && chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \ + && chmod 400 /root/.ssh/id_rsa \ +;fi + + ##################################### # MongoDB: ##################################### diff --git a/workspace/insecure_id_rsa b/workspace/insecure_id_rsa new file mode 100644 index 00000000..98337448 --- /dev/null +++ b/workspace/insecure_id_rsa @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEA9LX0DVV8VY0k+d58v+Tqe6LfhniBhBgBJ6/ZIGAFyuhqpyf9 +1Dn1ihcZeIBLrC4+IaRq0/xiVcdpyBu3fyGkYnyb57Pi2pOFo/te88j0ReeP5onO +mtDAERCR+Wkzi7kivg4Z4U1KgLeJn3R6WJgV1nUwFwwoPID+UC3RpHcS/TPhgZOL +Sog8dYUXx1fbmOnItJbKUK4Zz883li5LUwPLlmGZbrNYL90l1+s1Q9vlwevye2Wq +zXCvYh6DC3XRYIEnZxrOpDSyUHtAwMJ3HXgkIs3HV1dgPTt972mP29ANaG1MbqAo +retvQMMkPQv+9X96wUq34FEm9aTlT5oS0SQ2Xp3/zUvBSFtfeP7ubJb69bun4/4o +gmHLbdDzYNNFAJ5cm1gwyg95eXvCm5derk8Nf+QBHOlpd2gprVmKcERnrnv4Z1Mz +l6/f0o4UC3wfmQgErfNzfrtJFe54uxuf9OM9dXamcJJOsdUgM1hiZ6e+qYsHeAD9 +n7vCqjQJlrMhCGZpkeSUhkuYuLBrkhqIOq2VqKdS8CHzY3TixW7Pq5xdKDpqYGUX +qPHx/j5jpKt4h2j0L1ztwo9nedh1cbRyPp9oiow7twsxyD99b36rGSh35qKN3JBV +uMn6z3F8tIELMD49IyVCGyi2+jn7qbVLEOUr5IsFqFuIq5zt5ShfSi6N7e8CAwEA +AQKCAgA1t2M1Mhiy5uLA/re/n85hCWWrrPQxPNu0DIPK+YkL+2y9+KddWMOvZlau +/uqdhyEYXXEdy38CeV2dEYh8HbRp8hR/Dhu0A0IItvsm5GvKlIQgBQwXK8+db1e7 +uf4Yo7EeqxW/QSojiyZonDbnD6trghnmVULX1TD+BLDKO2Ett5++w9aFq9YpreeE +WKLZtCfcjGUoxK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AAMxQiBnw0bPEf5zpWzeKL0obxT/NhCgmV7 +/Fqs0GCbXEEgJo0zAVemALOAYRW3pYvt8FoCOopo4ADyfmdWlAvzCy46k7Fo +-----END RSA PRIVATE KEY----- diff --git a/workspace/insecure_id_rsa.pub b/workspace/insecure_id_rsa.pub new file mode 100644 index 00000000..d612ec1a --- /dev/null +++ b/workspace/insecure_id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD0tfQNVXxVjST53ny/5Op7ot+GeIGEGAEnr9kgYAXK6GqnJ/3UOfWKFxl4gEusLj4hpGrT/GJVx2nIG7d/IaRifJvns+Lak4Wj+17zyPRF54/mic6a0MAREJH5aTOLuSK+DhnhTUqAt4mfdHpYmBXWdTAXDCg8gP5QLdGkdxL9M+GBk4tKiDx1hRfHV9uY6ci0lspQrhnPzzeWLktTA8uWYZlus1gv3SXX6zVD2+XB6/J7ZarNcK9iHoMLddFggSdnGs6kNLJQe0DAwncdeCQizcdXV2A9O33vaY/b0A1obUxuoCit629AwyQ9C/71f3rBSrfgUSb1pOVPmhLRJDZenf/NS8FIW194/u5slvr1u6fj/iiCYctt0PNg00UAnlybWDDKD3l5e8Kbl16uTw1/5AEc6Wl3aCmtWYpwRGeue/hnUzOXr9/SjhQLfB+ZCASt83N+u0kV7ni7G5/04z11dqZwkk6x1SAzWGJnp76piwd4AP2fu8KqNAmWsyEIZmmR5JSGS5i4sGuSGog6rZWop1LwIfNjdOLFbs+rnF0oOmpgZReo8fH+PmOkq3iHaPQvXO3Cj2d52HVxtHI+n2iKjDu3CzHIP31vfqsZKHfmoo3ckFW4yfrPcXy0gQswPj0jJUIbKLb6OfuptUsQ5SvkiwWoW4irnO3lKF9KLo3t7w== insecure@laradock From 7a13e4a3434a31c9778a7c317f655e38ad0288ff Mon Sep 17 00:00:00 2001 From: Larry Eitel Date: Wed, 17 Aug 2016 19:53:01 -0600 Subject: [PATCH 2/7] Fix variable name --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 8932aa25..c7131c01 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -65,7 +65,7 @@ COPY ./xdebug_settings_only.ini /etc/php/7.0/cli/conf.d/xdebug_settings_only.ini ADD insecure_id_rsa /tmp/id_rsa ADD insecure_id_rsa.pub /tmp/id_rsa.pub ARG INSTALL_WORKSPACE_SSH=true -ENV INSTALL_WORKSPACE_SSH ${INSTALL_SSH} +ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH} RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ rm -f /etc/service/sshd/down && \ cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \ From 2d51548879017639d9a222272f4550587cbe2003 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 22 Aug 2016 11:01:34 +0800 Subject: [PATCH 3/7] support phpmyadmin container. Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 20 ++++++++++++++++++++ phpmyadmin/Dockerfile | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 phpmyadmin/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 29348e6f..0d3c33a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -209,6 +209,25 @@ services: links: - php-fpm +### phpMyAdmin Container ################################## + + phpmyadmin: + build: ./phpmyadmin + environment: + PMA_ARBITRARY: 1 + MYSQL_USER: homestead + MYSQL_PASSWORD: secret + MYSQL_ROOT_PASSWORD: root + volumes_from: + - volumes_data + ports: + - "8000:80" + links: + # for mysql container + - "mysql:db" + # for mariadb container + # - "mariadb:db" + ### Laravel Application Code Container ###################### volumes_source: @@ -231,5 +250,6 @@ services: - ./data/redis:/data - ./data/neo4j:/var/lib/neo4j/data - ./data/mongo:/data/db + - ./data/sessions:/sessions ### Add more Containers below ############################### diff --git a/phpmyadmin/Dockerfile b/phpmyadmin/Dockerfile new file mode 100644 index 00000000..87cb30b4 --- /dev/null +++ b/phpmyadmin/Dockerfile @@ -0,0 +1,11 @@ +FROM phpmyadmin/phpmyadmin + +MAINTAINER Bo-Yi Wu + +# Add volume for sessions to allow session persistence +VOLUME /sessions + +# We expose phpMyAdmin on port 80 +EXPOSE 80 + +ENTRYPOINT [ "/run.sh" ] From 3c8861d1d273deb68cf42fe2f323531ed7be5b9d Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 22 Aug 2016 11:02:21 +0800 Subject: [PATCH 4/7] remove empty data folder for mariadb. ref: https://github.com/docker-library/mariadb/blob/d969a465ee48fe10f4b532276f7337ddaaf3fc36/10.1/Dockerfile#L83 Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0d3c33a5..a15a005e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -245,7 +245,6 @@ services: volumes: - ./data/mysql:/var/lib/mysql - ./data/postgres:/var/lib/postgres - - ./data/mariadb:/var/lib/mariadb - ./data/memcached:/var/lib/memcached - ./data/redis:/data - ./data/neo4j:/var/lib/neo4j/data From 002b147b232c3ba77f45ae74d2cb480aae76eb93 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 23 Aug 2016 16:56:14 +0800 Subject: [PATCH 5/7] update readme for phpMyAdmin. Signed-off-by: Bo-Yi Wu --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b466c9fe..87b2cc7b 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red - Beanstalkd (+ Beanstalkd Console) - **Tools:** - Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...) + - phpMyAdmin >If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :) @@ -243,7 +244,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`, `workspace`. +`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`, `phpmyadmin`. **Note**: `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. From c68f70d2a797fa7e2cd59fd0eec9fd56cb871dad Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Tue, 23 Aug 2016 16:53:30 +0800 Subject: [PATCH 6/7] fix typo Signed-off-by: Bo-Yi Wu --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87b2cc7b..3ac1efc3 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ What's better than a **Demo Video**: ## Requirements -- [Git](https://git-scm.com/downloads) +- [Git](https://git-scm.com/downloads) - [Docker](https://www.docker.com/products/docker/) @@ -493,7 +493,7 @@ Example using Composer composer create-project laravel/laravel my-cool-app "5.2.*" ``` -> We recommand using `composer create-project` instead of the Laravel installer, to install Laravel. +> We recommend using `composer create-project` instead of the Laravel installer, to install Laravel. For more about the Laravel installation click [here](https://laravel.com/docs/master#installing-laravel). From 9fb50b2c6b94c3a944b132030c732ba9428e79bb Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Wed, 24 Aug 2016 00:43:11 +0300 Subject: [PATCH 7/7] fix phpmyadmin port. closes #247 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a15a005e..8f8eb326 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -221,7 +221,7 @@ services: volumes_from: - volumes_data ports: - - "8000:80" + - "8080:80" links: # for mysql container - "mysql:db"