From b80214540c0d12caa2286083773647b26f2f67b2 Mon Sep 17 00:00:00 2001 From: Andrey Volkov Date: Wed, 24 Oct 2018 07:40:56 -0700 Subject: [PATCH] Alternative cmd for nginx only --- Dockerfile | 2 +- Vagrantfile | 3 ++- assets/run_nginx.sh | 7 +++++++ assets/{run.sh => run_supervisord.sh} | 0 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 assets/run_nginx.sh rename assets/{run.sh => run_supervisord.sh} (100%) diff --git a/Dockerfile b/Dockerfile index ec8fbf8..c193a99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -81,4 +81,4 @@ RUN /opt/startup.sh VOLUME [ "/opt/nginx" ] -CMD [ "/opt/run.sh" ] +CMD [ "/opt/run_supervisord.sh" ] diff --git a/Vagrantfile b/Vagrantfile index bc05447..3ea0140 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -93,7 +93,8 @@ Vagrant.configure("2") do |config| d.build_image "/home/vagrant/docker-aptly -t aptly:test --build-arg PACKAGE_FILE=list" d.run "aptly", args: "-p '8080:80' -v '/home/vagrant/docker-aptly/assets/nginx:/opt/nginx'", - image: "aptly:test" + image: "aptly:test", + cmd: "/opt/run_nginx.sh" end node.vm.provision :shell, inline: <<-SHELL diff --git a/assets/run_nginx.sh b/assets/run_nginx.sh new file mode 100755 index 0000000..b632f1a --- /dev/null +++ b/assets/run_nginx.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -o pipefail +set -o errexit +# set -o xtrace + +/usr/sbin/nginx diff --git a/assets/run.sh b/assets/run_supervisord.sh similarity index 100% rename from assets/run.sh rename to assets/run_supervisord.sh