Skip to content

Commit 03fe707

Browse files
committed
REL-0.10 Move to devilbox namespace
1 parent 54b9874 commit 03fe707

File tree

9 files changed

+79
-109
lines changed

9 files changed

+79
-109
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ env:
2626
# travis encrypt DOCKER_USERNAME=user
2727
# travis encrypt DOCKER_PASSWORD=pass
2828
# Must be regenerated when repository name/owner changes
29-
- secure: "IvbPE2IK4P1pzGtYBKzTeYL1bhy5Zftvb7eJRSOOFjn5eo9r2tH6pMlEJr+aIc4UDGDRBvHAwM8+QzbNa7kaWPwSn9/tMr4xChzfvdNnSre1cHcmkS3uAlqxB1Hs50hQjD/USOzBhzatw4Q3sgb6wZRPfXI6j5Yz4tT6EsjWEQIiCWomE4xmh4N9chqmknVHLXcHElJVUyCndMFmZwRLAWWX799LMkqBXVXZI7Pp8GXoQ/2kN5HPgFDUPeRRT4ykF2iI2zJOdXM63UVgLQr8QBkzpO41llMz0AUl9jLC+N0lPbS1QqPoHsHE0U0Q5jJ6DMYk19W8PzLChFsrHs3kYZloZpMK5IcMV5bY7JNSavMrdbXIm8SOx3EWFMBDwFaxgA0xNYvya5HJ0LugZXLPwg/HrL4oYvMXyUnn6DGLooblanJZ3+3lF/PLewvCvpU2U6OmUevSP9wJ6hnKh4LjaM8pcw68S8DmzLu5sA/RqDATy42LToZdK836g3MBmd9SWdriLgaFeDhdcT1j12aPb060kd9ELh1qawHbxLsT1fV+bUBrc+0oVNrbld5epUP9IDYHjj2UOTiI9cKFSPqUy7iJm1zBXVwzVJ4RXDSd8Y1cB7nA1Mqs2gznxIgk0pT5p7Vaf0ngti5ANaodUoAEN5Bysss+4E/AwiaWFRqBa5I="
30-
- secure: "ZcRQGUC1+ykXVAGA7YdFF10EmQrSjwZCabrwZEJxp0HYitdK80UwE/jR4+vCCJarvj8LsvBaVNA0/DZpJPISZfAdrBB+tyqN1Vv0Q9CrEvdpp9lz729eYBwXV6KRHv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xQbbB2bDHBI3WhGAz38/V2PdaKt5EXVOxnmLELaDuTqusWm1xwQ3CU4hyUkwUabLY8dyIPw4odIfvifmT1j+F/TgqkiNtmmbQ0qOugzas1u8OwpoewKUaL2csf6RXZnJeCms986/wsV2GGb71HzFGCL+rTvl2AerOGJEI/llbtlfMg6xfRpvyj64fxakaDVACeItR/vLtGyNo="
31+
# DOCKER_PASSWORD
32+
- secure: "ZGYhAW7Cr+Cp0eyWvhB4Ash/6KuN9/7xUr+J0TQEQXAKpLdhwVXV95QA2V5tIRf/+M75OfGZQZcjsnNUkF/5I1N2z8rX4gHaWV8UP0b7OOOF6Z3ICobU3aK6g88UFiIA+GdAakHpCqpxaVxrLbEtTe3XT1R3/O/tf2FpCyxnTiDv9VeFIYwKQKvc8xpBKxjxZtARjy0FMEPRfr0eTn6GCtXcRFCNQK7ZIKEbUxPKp4ZtoXFQ5o+ul5q13KmzQs5QMnETY34wHiuxuKT5lRrZ+k+4IQFxCwjbxvPwjJagWbe3XkRXV7SgW/r+Ocj9l+0M77NOkQn6QlwI4q5LCAANkM+NwkTC6FgRAaytksXTCZcsuem4Zdrp1HbSAXrbgKS//fJd4wjdEpNCLN5MLOCcVgpYBsvZpmW8+b1EivmD4QmavGkN3St4lU0ROydXbVnXWHnbanqBz0H+4HAXY2QmBkf46EznEk/Jjhq7yzSY7q8/OAgSjPHAjhmDIoiUXJJDRTWWtmfC7yv09QbbrLuZFsAxa0JzUL8+inChcY6VuFH6QKBt35NGHjYxIB+yONFaDyHnWFa2EeF8ilxLxnGeUpbi9Mis52G3e4t7vmeolZq3sYGEaf+UNgZtj4ABdQLxkEBt7uF6dn+ojdqSKvV9CdatOtwYy6ElwI011wtT72Q="
3133
matrix:
3234
- TEST=0
3335
- TEST=1

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ MAINTAINER "cytopia" <[email protected]>
88
LABEL \
99
name="cytopia's Nginx Image" \
1010
image="nginx-mainline" \
11-
vendor="cytopia" \
11+
vendor="devilbox" \
1212
license="MIT" \
13-
build-date="2017-09-30"
13+
build-date="2017-10-01"
1414

1515

1616
###

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44

55
<sub>This Docker image is part of the **[devilbox](https://github.com/cytopia/devilbox)**.</sub>
66

7-
**[Apache 2.2](https://github.com/cytopia/docker-apache-2.2) | [Apache 2.4](https://github.com/cytopia/docker-apache-2.4) | [Nginx stable](https://github.com/cytopia/docker-nginx-stable) | Nginx mainline**
7+
**[Apache 2.2](https://github.com/devilbox/docker-apache-2.2) | [Apache 2.4](https://github.com/devilbox/docker-apache-2.4) | [Nginx stable](https://github.com/devilbox/docker-nginx-stable) | Nginx mainline**
88

9-
[![Build Status](https://travis-ci.org/cytopia/docker-nginx-mainline.svg?branch=master)](https://travis-ci.org/cytopia/docker-nginx-mainline) [![](https://images.microbadger.com/badges/version/cytopia/nginx-mainline.svg)](https://microbadger.com/images/cytopia/nginx-mainline "nginx-mainline") [![](https://images.microbadger.com/badges/image/cytopia/nginx-mainline.svg)](https://microbadger.com/images/cytopia/nginx-mainline "nginx-mainline") [![](https://images.microbadger.com/badges/license/cytopia/nginx-mainline.svg)](https://microbadger.com/images/cytopia/nginx-mainline "nginx-mainline")
9+
[![Build Status](https://travis-ci.org/devilbox/docker-nginx-mainline.svg?branch=master)](https://travis-ci.org/devilbox/docker-nginx-mainline) [![](https://images.microbadger.com/badges/version/devilbox/nginx-mainline.svg)](https://microbadger.com/images/devilbox/nginx-mainline "nginx-mainline") [![](https://images.microbadger.com/badges/image/devilbox/nginx-mainline.svg)](https://microbadger.com/images/devilbox/nginx-mainline "nginx-mainline") [![](https://images.microbadger.com/badges/license/devilbox/nginx-mainline.svg)](https://microbadger.com/images/devilbox/nginx-mainline "nginx-mainline")
1010

11-
This image is based on the official **[Nginx (mainline)](https://hub.docker.com/_/nginx/)** Docker image and extends it with the ability to have **virtual hosts created automatically** when adding new directories. For that to work, it integrates two tools that will take care about the whole process: **[watcherd]()** and **[vhost-gen]()**.
11+
This image is based on the official **[Nginx (mainline)](https://hub.docker.com/_/nginx/)** Docker image and extends it with the ability to have **virtual hosts created automatically** when adding new directories. For that to work, it integrates two tools that will take care about the whole process: **[watcherd](https://github.com/devilbox/watcherd)** and **[vhost-gen](https://github.com/devilbox/vhost-gen)**.
1212

1313
From a users perspective, you mount your local project directory into the Docker under `/shared/httpd`. Any directory then created in your local project directory wil spawn a new virtual host by the same name. Additional settings such as custom server names, PHP-FPM or even different nginx templates per project are supported as well.
1414

1515
----
1616

17-
Find me on **[Docker Hub](https://hub.docker.com/r/cytopia/nginx-mainline)**:
17+
Find me on **[Docker Hub](https://hub.docker.com/r/devilbox/nginx-mainline)**:
1818

19-
[![cytopia/nginx-mainline](http://dockeri.co/image/cytopia/nginx-mainline)](https://hub.docker.com/r/cytopia/nginx-mainline/)
19+
[![devilbox/nginx-mainline](http://dockeri.co/image/devilbox/nginx-mainline)](https://hub.docker.com/r/devilbox/nginx-mainline/)
2020

21-
<small>**Latest build:** 2017-09-30</small>
21+
<small>**Latest build:** This container is built every night by [travis-ci](https://travis-ci.org/devilbox/docker-nginx-mainline).</small>
2222

2323
----
2424

@@ -170,14 +170,14 @@ Mount your local directort `~/my-host-www` into the docker and server those file
170170

171171
**Note:** Files will be server from `~/my-host-www/htdocs`.
172172
```bash
173-
$ docker run -d -p 80:80 -v ~/my-host-www:/var/www/default -t cytopia/nginx-mainline
173+
$ docker run -d -p 80:80 -v ~/my-host-www:/var/www/default -t devilbox/nginx-mainline
174174
```
175175

176176
#### 2. Serve PHP files with PHP-FPM
177177

178178
Note, for this to work, the `~/my-host-www` dir must be mounted into the Nginx Docker as well as into the php-fpm docker.
179179

180-
You can also attach other PHP-FPM version: [PHP-FPM 5.4](https://github.com/cytopia/docker-php-fpm-5.4), [PHP-FPM 5.5](https://github.com/cytopia/docker-php-fpm-5.5), [PHP-FPM 5.6](https://github.com/cytopia/docker-php-fpm-5.6), [PHP-FPM 7.0](https://github.com/cytopia/docker-php-fpm-7.0) or [PHP-FPM 7.1](https://github.com/cytopia/docker-php-fpm-7.1)
180+
You can also attach other PHP-FPM version: [PHP-FPM 5.4](https://github.com/cytopia/docker-php-fpm-5.4), [PHP-FPM 5.5](https://github.com/cytopia/docker-php-fpm-5.5), [PHP-FPM 5.6](https://github.com/cytopia/docker-php-fpm-5.6), [PHP-FPM 7.0](https://github.com/cytopia/docker-php-fpm-7.0), [PHP-FPM 7.1](https://github.com/cytopia/docker-php-fpm-7.1), [PHP-FPM 7.2](https://github.com/cytopia/docker-php-fpm-7.2) or [HHVM](https://github.com/cytopia/docker-hhvm-latest).
181181

182182
Each PHP-FPM docker also has the option to enable Xdebug and more, see their respective Readme files for futher settings.
183183

@@ -193,7 +193,7 @@ $ docker run -d \
193193
-e PHP_FPM_SERVER_ADDR=php \
194194
-e PHP_FPM_SERVER_PORT=9000 \
195195
--link php \
196-
-t cytopia/nginx-mainline
196+
-t devilbox/nginx-mainline
197197
```
198198

199199
#### 3. Fully functional LEMP stack
@@ -228,7 +228,7 @@ $ docker run -d \
228228
-e PHP_FPM_SERVER_PORT=9000 \
229229
--link php \
230230
--link mysql \
231-
-t cytopia/nginx-mainline
231+
-t devilbox/nginx-mainline
232232
```
233233

234234
#### 4. Ultimate pre-configured docker-compose setup

build/docker-attach.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,32 @@ if [ ! -f "${CWD}/Dockerfile" ]; then
3232
exit 1
3333
fi
3434

35-
# Get docker Name
35+
# Test Docker name
3636
if ! grep -q 'image=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
3737
echo "No 'image' LABEL found"
3838
exit
3939
fi
4040

41-
# Make sure exactly 1 container is running
41+
# Test Docker vendor
42+
if ! grep -q 'vendor=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
43+
echo "No 'vendor' LABEL found"
44+
exit
45+
fi
46+
47+
# Retrieve values
4248
NAME="$( grep 'image=".*"' "${CWD}/Dockerfile" | sed 's/^[[:space:]]*//g' | awk -F'"' '{print $2}' )"
43-
COUNT="$( docker ps | grep -c "cytopia/${NAME}" || true)"
49+
VEND="$( grep -Eo 'vendor="(.*)"' "${CWD}/Dockerfile" | awk -F'"' '{print $2}' )"
50+
COUNT="$( docker ps | grep -c "${VEND}/${NAME}" || true)"
4451
if [ "${COUNT}" != "1" ]; then
45-
echo "${COUNT} 'cytopia/${NAME}' container running. Unable to attach."
52+
echo "${COUNT} '${VEND}/${NAME}' container running. Unable to attach."
4653
exit 1
4754
fi
4855

4956

5057
###
5158
### Attach
5259
###
53-
DID="$(docker ps | grep "cytopia/${NAME}" | awk '{print $1}')"
60+
DID="$(docker ps | grep "${VEND}/${NAME}" | awk '{print $1}')"
5461

55-
echo "Attaching to: cytopia/${NAME}"
62+
echo "Attaching to: ${VEND}/${NAME}"
5663
run "docker exec -it ${DID} env TERM=xterm /bin/bash -l"

build/docker-build.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,21 @@ if [ ! -f "${CWD}/Dockerfile" ]; then
3232
exit 1
3333
fi
3434

35-
# Get docker Name
35+
# Test Docker name
3636
if ! grep -q 'image=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
3737
echo "No 'image' LABEL found"
3838
exit
3939
fi
40+
41+
# Test Docker vendor
42+
if ! grep -q 'vendor=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
43+
echo "No 'vendor' LABEL found"
44+
exit
45+
fi
46+
47+
# Retrieve values
4048
NAME="$( grep 'image=".*"' "${CWD}/Dockerfile" | sed 's/^[[:space:]]*//g' | awk -F'"' '{print $2}' )"
49+
VEND="$( grep -Eo 'vendor="(.*)"' "${CWD}/Dockerfile" | awk -F'"' '{print $2}' )"
4150
DATE="$( date '+%Y-%m-%d' )"
4251

4352

@@ -53,18 +62,17 @@ run "docker pull ${MY_BASE}"
5362
###
5463

5564
# Update build date
56-
run "sed -i'' 's/<small>\*\*Latest\sbuild.*/<small>**Latest build:** ${DATE}<\/small>/g' ${CWD}/README.md"
5765
run "sed -i'' 's/build-date=\".*\"/build-date=\"${DATE}\"/g' ${CWD}/Dockerfile"
5866

5967
# Build Docker
60-
run "docker build -t cytopia/${NAME} ${CWD}"
68+
run "docker build -t ${VEND}/${NAME} ${CWD}"
6169

6270

6371
###
6472
### Retrieve information afterwards and Update README.md
6573
###
66-
docker run -d --rm --name my_tmp_${NAME} -t cytopia/${NAME}
67-
INFO="$( docker exec my_tmp_${NAME} nginx -V 2>&1 | grep -E '^(nginx|built|TLS)' )"
74+
docker run -d --rm --name my_tmp_${NAME} -t ${VEND}/${NAME}
75+
INFO="$( docker exec my_tmp_${NAME} httpd -V | grep -E '^Server.*(version|built|Module|loaded|MPM)' )"
6876
docker stop "$(docker ps | grep "my_tmp_${NAME}" | awk '{print $1}')" > /dev/null
6977

7078
INFO="$( echo "${INFO}" | sed 's/\s$//g' )" # remove trailing space

build/docker-enter.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,24 @@ if [ ! -f "${CWD}/Dockerfile" ]; then
3232
exit 1
3333
fi
3434

35-
# Get docker Name
35+
# Test Docker name
3636
if ! grep -q 'image=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
3737
echo "No 'image' LABEL found"
3838
exit
3939
fi
40+
41+
# Test Docker vendor
42+
if ! grep -q 'vendor=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
43+
echo "No 'vendor' LABEL found"
44+
exit
45+
fi
46+
47+
# Retrieve values
4048
NAME="$( grep 'image=".*"' "${CWD}/Dockerfile" | sed 's/^[[:space:]]*//g' | awk -F'"' '{print $2}' )"
49+
VEND="$( grep -Eo 'vendor="(.*)"' "${CWD}/Dockerfile" | awk -F'"' '{print $2}' )"
4150

4251

4352
###
4453
### Enter
4554
###
46-
run "docker run -i --entrypoint /bin/bash -t cytopia/${NAME}"
55+
run "docker run -i --entrypoint /bin/bash -t ${VEND}/${NAME}"

build/docker-push.sh

Lines changed: 0 additions & 75 deletions
This file was deleted.

build/docker-rebuild.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,21 @@ if [ ! -f "${CWD}/Dockerfile" ]; then
3232
exit 1
3333
fi
3434

35-
# Get docker Name
35+
# Test Docker name
3636
if ! grep -q 'image=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
3737
echo "No 'image' LABEL found"
3838
exit
3939
fi
40+
41+
# Test Docker vendor
42+
if ! grep -q 'vendor=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
43+
echo "No 'vendor' LABEL found"
44+
exit
45+
fi
46+
47+
# Retrieve values
4048
NAME="$( grep 'image=".*"' "${CWD}/Dockerfile" | sed 's/^[[:space:]]*//g' | awk -F'"' '{print $2}' )"
49+
VEND="$( grep -Eo 'vendor="(.*)"' "${CWD}/Dockerfile" | awk -F'"' '{print $2}' )"
4150
DATE="$( date '+%Y-%m-%d' )"
4251

4352

@@ -53,18 +62,17 @@ run "docker pull ${MY_BASE}"
5362
###
5463

5564
# Update build date
56-
run "sed -i'' 's/<small>\*\*Latest\sbuild.*/<small>**Latest build:** ${DATE}<\/small>/g' ${CWD}/README.md"
5765
run "sed -i'' 's/build-date=\".*\"/build-date=\"${DATE}\"/g' ${CWD}/Dockerfile"
5866

5967
# Build Docker
60-
run "docker build --no-cache -t cytopia/${NAME} ${CWD}"
68+
run "docker build --no-cache -t ${VEND}/${NAME} ${CWD}"
6169

6270

6371
###
6472
### Retrieve information afterwards and Update README.md
6573
###
66-
docker run -d --rm --name my_tmp_${NAME} -t cytopia/${NAME}
67-
INFO="$( docker exec my_tmp_${NAME} nginx -V 2>&1 | grep -E '^(nginx|built|TLS)' )"
74+
docker run -d --rm --name my_tmp_${NAME} -t ${VEND}/${NAME}
75+
INFO="$( docker exec my_tmp_${NAME} httpd -V | grep -E '^Server.*(version|built|Module|loaded|MPM)' )"
6876
docker stop "$(docker ps | grep "my_tmp_${NAME}" | awk '{print $1}')" > /dev/null
6977

7078
INFO="$( echo "${INFO}" | sed 's/\s$//g' )" # remove trailing space

build/docker-start.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,23 @@ if [ ! -f "${CWD}/Dockerfile" ]; then
3232
exit 1
3333
fi
3434

35-
# Get docker Name
35+
36+
# Test Docker name
3637
if ! grep -q 'image=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
3738
echo "No 'image' LABEL found"
3839
exit
3940
fi
41+
42+
# Test Docker vendor
43+
if ! grep -q 'vendor=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
44+
echo "No 'vendor' LABEL found"
45+
exit
46+
fi
47+
48+
# Retrieve values
4049
NAME="$( grep 'image=".*"' "${CWD}/Dockerfile" | sed 's/^[[:space:]]*//g' | awk -F'"' '{print $2}' )"
50+
VEND="$( grep -Eo 'vendor="(.*)"' "${CWD}/Dockerfile" | awk -F'"' '{print $2}' )"
51+
4152

4253
###
4354
### Run
@@ -46,4 +57,4 @@ _args=""
4657
if [ "${#}" != "0" ]; then
4758
_args="${*}"
4859
fi
49-
run "docker run -it ${_args} cytopia/${NAME}"
60+
run "docker run -it ${_args} ${VEND}/${NAME}"

0 commit comments

Comments
 (0)