From 12b7743660fb564c2b9e3c73f6d080755e0c9133 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Tue, 19 Nov 2024 13:49:38 -0500 Subject: [PATCH] Added windows .bat scripts for docker-build and docker-run --- Dockerfile | 4 ++-- bin/docker-build.bat | 4 ++++ bin/docker-run.bat | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 bin/docker-build.bat diff --git a/Dockerfile b/Dockerfile index 5f135e3..af676fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # PHP composer to get dependencies -FROM composer:2.5 as COMPOSER +FROM composer:2.5 AS composer WORKDIR /usr/src/colossus/ @@ -14,7 +14,7 @@ FROM php:8.2-cli WORKDIR /usr/src/colossus/ -COPY --from=COMPOSER /usr/src/colossus/vendor/ /usr/src/colossus/vendor/ +COPY --from=composer /usr/src/colossus/vendor/ /usr/src/colossus/vendor/ COPY . /usr/src/colossus/ VOLUME /usr/src/colossus/vendor/ diff --git a/bin/docker-build.bat b/bin/docker-build.bat new file mode 100644 index 0000000..1f32210 --- /dev/null +++ b/bin/docker-build.bat @@ -0,0 +1,4 @@ +@ECHO OFF + +docker build -t colossus-php . +docker build -t colossus-grunt -f Dockerfile.grunt . diff --git a/bin/docker-run.bat b/bin/docker-run.bat index 5427c34..0ed8250 100644 --- a/bin/docker-run.bat +++ b/bin/docker-run.bat @@ -1,3 +1,4 @@ @ECHO OFF -docker run --rm -d -w "/usr/src/colossus" -v "%cd%:/usr/src/colossus" -p 8080:8080 --name colossus php:8.1 php -S 0.0.0.0:8080 -t public public/index.php +docker run --rm -d -w "/usr/src/colossus" -v "%cd%:/usr/src/colossus" -p 8080:8080 --name colossus-php colossus-php +docker run --rm -d -w "/usr/src/colossus" -v "%cd%:/usr/src/colossus" --name colossus-grunt colossus-grunt npm run grunt watch