Skip to content

Commit f1f235a

Browse files
bryanlattenBryan Latten
andauthored
Nginx: changed to ondrej/nginx (#71)
* Dockerfile: moving from nginx to ondrej PPA Base OS moved from Ubuntu 18.04 —> 20.04 * Travis: updated for parallelism Co-authored-by: Bryan Latten <[email protected]>
1 parent 0ee8249 commit f1f235a

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

.test.env

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SERVER_LOG_MINIMAL=1
2+
SERVER_APP_NAME=docker-nginx
3+
S6_KILL_FINISH_MAXTIME=1
4+
S6_KILL_GRACETIME=1
5+
SERVER_WORKER_PROCESSES=1
6+
SERVER_CLIENT_HEADER_BUFFER_SIZE=8k
7+
SERVER_LARGE_CLIENT_HEADER_BUFFERS=8 16k
8+
SERVER_CLIENT_BODY_BUFFER_SIZE=128k

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
sudo: required
22

3+
env:
4+
- DOCKERFILE=Dockerfile
5+
- DOCKERFILE=Dockerfile-alpine
6+
- DOCKERFILE=Dockerfile-centos
7+
38
services:
49
- docker
510

611
script:
7-
- docker-compose build ubuntu
8-
- docker-compose build alpine
9-
- docker-compose build centos
10-
- docker-compose up -d
12+
- docker build -t nginxtest -f ${DOCKERFILE} .
13+
- docker run -p 8080:8080 -d nginxtest
14+
- docker run -p 8081:8080 -d --env-file ./.test.env nginxtest
1115
- sleep 5
12-
- docker-compose ps
1316
- curl localhost:8080 | grep "Welcome to nginx!"
1417
- curl localhost:8081 | grep "Welcome to nginx!"
15-
- curl localhost:8082 | grep "Welcome to nginx!"
16-
- docker-compose kill

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM behance/docker-base:2.6-ubuntu-18.04
1+
FROM behance/docker-base:2.6-ubuntu-20.04
22
MAINTAINER Bryan Latten <[email protected]>
33

44
# Use in multi-phase builds, when an init process requests for the container to gracefully exit, so that it may be committed
@@ -21,7 +21,7 @@ RUN /bin/bash -e /security_updates.sh && \
2121
apt-get install --no-install-recommends -yqq \
2222
software-properties-common \
2323
&& \
24-
add-apt-repository ppa:nginx/development -y && \
24+
add-apt-repository ppa:ondrej/nginx -y && \
2525
apt-get update -yqq && \
2626
apt-get install -yqq --no-install-recommends \
2727
nginx-light \

0 commit comments

Comments
 (0)