From 162150691c61d978c2f9d06663f2219bc6afa613 Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Sun, 14 Jan 2018 21:27:44 -0500 Subject: [PATCH] Remove -t from docker run commands (#184) Allows running the update commands from cron without getting the TTY error listed in https://github.com/bitwarden/core/issues/180 Given what happens when each of these docker run commands execute, it seems like the -t flag is unnecessary. Based on this helpful explanation of the -i and -t flags for docker run: https://gist.github.com/v0lkan/c413cf9477b607db1ea1117c9de853df --- scripts/run.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index 7bf3925158..de78e8cf1c 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -53,27 +53,27 @@ function updateLetsEncrypt() { if [ -d "${OUTPUT_DIR}/letsencrypt/live" ] then docker pull certbot/certbot - docker run -it --rm --name certbot -p 443:443 -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \ + docker run -i --rm --name certbot -p 443:443 -p 80:80 -v $OUTPUT_DIR/letsencrypt:/etc/letsencrypt/ certbot/certbot \ renew --logs-dir /etc/letsencrypt/logs fi } function updateDatabase() { pullSetup - docker run -it --rm --name setup --network container:bitwarden-mssql -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$COREVERSION \ + docker run -i --rm --name setup --network container:bitwarden-mssql -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$COREVERSION \ dotnet Setup.dll -update 1 -db 1 -os $OS -corev $COREVERSION -webv $WEBVERSION echo "Database update complete" } function update() { pullSetup - docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$COREVERSION \ + docker run -i --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$COREVERSION \ dotnet Setup.dll -update 1 -os $OS -corev $COREVERSION -webv $WEBVERSION } function printEnvironment() { pullSetup - docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$COREVERSION \ + docker run -i --rm --name setup -v $OUTPUT_DIR:/bitwarden bitwarden/setup:$COREVERSION \ dotnet Setup.dll -printenv 1 -os $OS -corev $COREVERSION -webv $WEBVERSION }