From f1f235a0d42e5a865a44de61745445a9d27a55d7 Mon Sep 17 00:00:00 2001 From: Bryan Latten Date: Wed, 29 Apr 2020 20:56:27 -0400 Subject: [PATCH] Nginx: changed to ondrej/nginx (#71) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- .test.env | 8 ++++++++ .travis.yml | 15 ++++++++------- Dockerfile | 4 ++-- 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 .test.env diff --git a/.test.env b/.test.env new file mode 100644 index 0000000..94d65ee --- /dev/null +++ b/.test.env @@ -0,0 +1,8 @@ +SERVER_LOG_MINIMAL=1 +SERVER_APP_NAME=docker-nginx +S6_KILL_FINISH_MAXTIME=1 +S6_KILL_GRACETIME=1 +SERVER_WORKER_PROCESSES=1 +SERVER_CLIENT_HEADER_BUFFER_SIZE=8k +SERVER_LARGE_CLIENT_HEADER_BUFFERS=8 16k +SERVER_CLIENT_BODY_BUFFER_SIZE=128k diff --git a/.travis.yml b/.travis.yml index 1177706..f1a8acf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,17 @@ sudo: required +env: + - DOCKERFILE=Dockerfile + - DOCKERFILE=Dockerfile-alpine + - DOCKERFILE=Dockerfile-centos + services: - docker script: -- docker-compose build ubuntu -- docker-compose build alpine -- docker-compose build centos -- docker-compose up -d +- docker build -t nginxtest -f ${DOCKERFILE} . +- docker run -p 8080:8080 -d nginxtest +- docker run -p 8081:8080 -d --env-file ./.test.env nginxtest - sleep 5 -- docker-compose ps - curl localhost:8080 | grep "Welcome to nginx!" - curl localhost:8081 | grep "Welcome to nginx!" -- curl localhost:8082 | grep "Welcome to nginx!" -- docker-compose kill diff --git a/Dockerfile b/Dockerfile index abc7a06..b668a7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM behance/docker-base:2.6-ubuntu-18.04 +FROM behance/docker-base:2.6-ubuntu-20.04 MAINTAINER Bryan Latten # 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 && \ apt-get install --no-install-recommends -yqq \ software-properties-common \ && \ - add-apt-repository ppa:nginx/development -y && \ + add-apt-repository ppa:ondrej/nginx -y && \ apt-get update -yqq && \ apt-get install -yqq --no-install-recommends \ nginx-light \