Skip to content

Commit 63e0c6e

Browse files
committed
Merge pull request wunderio#31 from wunderkraut/latest-quay-images
Latest quay images
2 parents 8933a99 + 7b9704c commit 63e0c6e

File tree

8 files changed

+64
-37
lines changed

8 files changed

+64
-37
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ similar to vagrant:
3636
Typically you will need to run composer:
3737

3838
$/> wundertools/composer update
39-
$/> wundertools/composer upgrade
39+
$/> wundertools/composer install
4040

4141
Then you should be up and running. See "access my site"
4242

@@ -58,13 +58,7 @@ Get more information by looking in the wundertools/docs
5858

5959
### Accessing my containers
6060

61-
@TODO
62-
63-
### DNS
64-
65-
*** DNS is an open topic that we have not resolved. Consider just using hostfile entries for now.
66-
67-
#### /etc/hosts
61+
#### Container IP
6862

6963
You can usually rely on a direct route to your container. To find the IP for any container:
7064

@@ -73,3 +67,12 @@ You can usually rely on a direct route to your container. To find the IP for an
7367
*** Note that on some docker setups, the host has not routed container traffic
7468
to the docker subnet (bad host) and so a manual route may be necessary. The OSX Beta client seems to have this issue, but no route seems avaialable.
7569

70+
#### Container shell
71+
72+
You can get a fast shell inside any of the actual containers using:
73+
74+
$/> wundertools/tools/execshell fpm
75+
76+
*** Note that this shell is not as usefull as the featured shell from "wundertools/shell" as most of the service images do not even have bash installed.
77+
78+

wundertools/compose-default.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ services:
7474
#
7575
db:
7676
#image: quay.io/wunder/alpine-mariadb
77-
image: jamesnesbitt/alpine-mariadb-app
77+
image: quay.io/wunder/wundertools-image-fuzzy-mariadb
7878

7979
####
8080
# IMAGE BUILD OVERRIDES
@@ -110,7 +110,7 @@ services:
110110
#
111111
fpm:
112112
#image: quay.io/wunder/alpine-php-app
113-
image: jamesnesbitt/alpine-php-app
113+
image: quay.io/wunder/wundertools-image-fuzzy-php
114114
volumes_from:
115115
- source # FPM gets source code from the source container (should be ReadOnly)
116116
links:
@@ -132,7 +132,7 @@ services:
132132
#
133133
www:
134134
#image: quay.io/wunder/alpine-nginx-pagespeed-app
135-
image: jamesnesbitt/alpine-nginx-pagespeed-app
135+
image: quay.io/wunder/wundertools-image-fuzzy-nginx
136136
environment:
137137
# If you are using DNSDOCK, this will assign a local DNS entry
138138
DNSDOCK_ALIAS: www.wunderdemo.docker

wundertools/composer

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ CONTAINER_ARGS="${@:1}"
99
docker run --rm -t -i \
1010
--net "${COMPOSE_NETWORK}" \
1111
--hostname=${PROJECT} \
12-
--volume="${PATH_APP}/web:/app/web" \
13-
--volume="${PATH_APP}/vendor:/app/vendor" \
12+
--volumes-from="${PROJECT}_source_1" \
1413
--volume="${PATH_APP}/scripts:/app/scripts" \
1514
--volume="${PATH_APP}/composer.json:/app/composer.json" \
1615
--volume="${PATH_HOME}/.gitconfig:/app/.gitconfig" \
1716
--volume="${PATH_HOME}/.ssh:/app/.ssh" \
18-
--entrypoint=/usr/bin/composer \
19-
-w=/app/project \
17+
--entrypoint=composer \
18+
-w=/app \
2019
--name="${PROJECT}_composer" \
21-
jamesnesbitt/wunder-developershell \
22-
--working-dir=/app/project \
20+
--user=app \
21+
${DOCKER_IMAGE_DEVELOPERTOOL} \
22+
--working-dir=/app \
2323
${CONTAINER_ARGS}
2424

2525
#echo "

wundertools/config.inc

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@
1818
# images that the system will build. By default it uses the project
1919
# root path basename, but you can use this to override it.
2020
#
21+
# @NOTE keep this [a-z] and [0-9] for your own sanity
2122
#
22-
#PROJECT=""
23+
#PROJECT="myproject"
2324

2425
###
2526
# Some important paths used in the app. These are autodetermined by
2627
# default to be ./app and ./wundertools from your root project, but
2728
# I guess that you could override them here.
2829
#
30+
#
2931
#PATH_APP=""
3032
#PATH_WUNDERTOOLS=""
3133

@@ -37,7 +39,7 @@
3739
# It is easier to maintain a single image for this, although each
3840
# container could of course use it's own image.
3941
#
40-
DOCKER_IMAGE_DEVELOPERTOOL="quay.io/wunder/alpine-developershell-james"
42+
#DOCKER_IMAGE_DEVELOPERTOOL=""
4143

4244
#######################################
4345
# THINGS THAT AREN'T ALWAYS WORKING YET
@@ -46,14 +48,9 @@ DOCKER_IMAGE_DEVELOPERTOOL="quay.io/wunder/alpine-developershell-james"
4648
# In general each section here has it's own documentation describing it's issue
4749

4850

49-
#
50-
# Networking id and bridge problem.
51-
#
52-
# ERROR: docker: Error response from daemon: network {SOMETHING}_default not found.
53-
# SHORT ANSWER: try setting this: COMPOSE_NETWORK="bridge"
54-
# LONG ANSWER: do "docker inspect $CONTAINER" on one of your containers and look for "Networks": {"{NETWORK}"
55-
#
56-
#COMPOSE_NETWORK="bridge" # this makes docker-compose use the shared docker network interface
51+
52+
# nothing here right now
53+
5754

5855

5956
################
@@ -80,8 +77,14 @@ fi
8077
if [ -z "${PATH_WUNDERTOOLS}" ]; then
8178
PATH_WUNDERTOOLS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
8279
fi
80+
81+
82+
SUBPATH_APP="app" # @NOTE THAT IF YOU CHANGE THIS, YOU MIGHT NEED TO CHANGE THE YML FILE BINDS TO MATCH
83+
if [ -z "${SUBPATH_APP}" ]; then
84+
SUBPATH_APP="app"
85+
fi
8386
if [ -z "${PATH_APP}" ]; then
84-
PATH_APP="$( cd "$( dirname "${PATH_WUNDERTOOLS}" )" && pwd )/app"
87+
PATH_APP="$( cd "$( dirname "${PATH_WUNDERTOOLS}" )" && pwd )/${SUBPATH_APP}"
8588
fi
8689

8790
if [ ! -f ~/.gitconfig ]; then
@@ -98,14 +101,17 @@ if [ -z "${PROJECT}" ]; then
98101
PROJECT="$(basename $(cd ${PATH_APP} && cd ../ && pwd))"
99102
fi
100103

104+
# perform some sanity checks on the project name, to make it safe for docker networks and container names
105+
PROJECT="${PROJECT,,}" # lower case
106+
101107
#
102108
# DOCKER COMPOSE
103109
#
104110

105111
# dev image
106112
if [ -z "${DOCKER_IMAGE_DEVELOPERTOOL}" ]; then
107113
# this is just some old image that I (James) have been using for a while.
108-
DOCKER_IMAGE_DEVELOPERTOOL="quay.io/wunder/alpine-developershell-james"
114+
DOCKER_IMAGE_DEVELOPERTOOL="quay.io/wunder/wundertools-image-fuzzy-developershell"
109115
fi
110116

111117
# Set some vars use by Docker-Compose. This may not be necessary for us.

wundertools/drupal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ docker run --rm -t -i \
2525
--net "${COMPOSE_NETWORK}" \
2626
--hostname=${PROJECT} \
2727
--link="${PROJECT}_db_1:db.app" \
28-
--volume="${PATH_APP}/web:/app/web" \
29-
--volume="${PATH_APP}/vendor:/app/vendor" \
28+
--volumes-from="${PROJECT}_source_1" \
3029
--volume="${PATH_APP}/console:/app/.console" \
3130
--volume="${PATH_APP}/drush:/app/.drush" \
3231
--volume="${PATH_HOME}/.ssh:/app/.ssh" \
3332
-w=/app/web \
3433
--name="${PROJECT}_drupal" \
35-
--entrypoint=/app/project/vendor/bin/drupal \
34+
--entrypoint=/app/vendor/bin/drupal \
3635
--user=app \
3736
${DOCKER_IMAGE_DEVELOPERTOOL} \
3837
${CONTAINER_ARGS}

wundertools/drush

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ docker run --rm -t -i \
1515
--net "${COMPOSE_NETWORK}" \
1616
--hostname=${PROJECT} \
1717
--link="${PROJECT}_db_1:db.app" \
18-
--volume="${PATH_APP}/web:/app/web" \
19-
--volume="${PATH_APP}/vendor:/app/vendor" \
18+
--volumes-from="${PROJECT}_source_1" \
2019
--volume="${PATH_APP}/drush:/app/.drush" \
2120
--volume="${PATH_HOME}/.ssh:/app/.ssh" \
2221
-w=/app/web \
2322
--name="${PROJECT}_drush" \
24-
--entrypoint=/app/project/vendor/bin/drush \
23+
--entrypoint=/app/vendor/bin/drush \
2524
--user=app \
2625
${DOCKER_IMAGE_DEVELOPERTOOL} \
2726
${CONTAINER_ARGS}

wundertools/shell

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ docker run --rm -t -i \
1212
--link="${PROJECT}_db_1:db.app" \
1313
--link="${PROJECT}_fpm_1:fpm.app" \
1414
--link="${PROJECT}_www_1:www.app" \
15-
--volume="${PATH_APP}/web:/app/web" \
16-
--volume="${PATH_APP}/vendor:/app/vendor" \
15+
--volumes-from="${PROJECT}_source_1" \
1716
--volume="${PATH_APP}/scripts:/app/scripts" \
1817
--volume="${PATH_APP}/composer.json:/app/composer.json" \
1918
--volume="${PATH_APP}/console:/app/.console" \

wundertools/tools/execshell

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../config.inc"
4+
5+
# Which node to shell into
6+
NODE="${1}"
7+
if [ -z "${NODE}" ]; then
8+
echo "[- There was no node specified, did you want to check for 'containerIP www'? -]"
9+
exit 1
10+
fi
11+
12+
# What command to run
13+
SHELL="${2:-/bin/sh}"
14+
15+
# echo ">>>>>DOCKER:>EXECSHELL START [NODE:$NODE]
16+
# "
17+
18+
docker exec -t -i "${PROJECT}_${NODE}_1" "${SHELL}"
19+
20+
# echo "
21+
# <<<<<DOCKER:SHELL END "

0 commit comments

Comments
 (0)