From 0410552de9a5d2ca8373fcf88f51dd2e88e11ef1 Mon Sep 17 00:00:00 2001 From: Fascinated Date: Tue, 4 Jul 2023 16:51:11 +0100 Subject: [PATCH] fix docker image? --- Dockerfile | 1 + docker/start.sh | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a587a6..658ccb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ apt install nginx php-fpm php-gd -y COPY ./docker/nginx.conf /etc/nginx/nginx.conf # Setup scripts +COPY ./upload.php /tmp/upload.php COPY ./docker/start.sh /start.sh # Start server diff --git a/docker/start.sh b/docker/start.sh index d314456..7167f2a 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,10 +1,8 @@ -UPLOAD_SCRIPT="upload.php" - -echo "Checking if $UPLOAD_SCRIPT exists in /var/www/html" -if [ -f "$UPLOAD_SCRIPT" ]; then +echo "Checking if upload script exists in /var/www/html" +if [ -f "/var/www/html/upload.php" ]; then echo "Upload script was found, ignoring copy." else - cp /var/www/html/$UPLOAD_SCRIPT $UPLOAD_SCRIPT + cp /tmp/upload.php /var/www/html echo "Upload script was not found, copying it." fi