Skip to content

Commit

Permalink
v1.1.1 container_setup.bat
Browse files Browse the repository at this point in the history
Docker Container setup for Windows, after Docker has been installed.
  • Loading branch information
Jon8RFC authored Jan 13, 2024
1 parent dc668c2 commit 780eb23
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions container_setup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@echo off
:name
echo. & echo. & set /P name=Type a name in lowercase for the patcher and press ENTER:
if "%name%"=="" (
echo. & echo. & echo --- Please enter something as instructed ---
goto:name
)
echo.
echo -----
echo Pruning the Docker builder...
echo -----
docker builder prune -f
echo.
echo.
echo -----
echo Building from Dockerfile...
echo -----
docker build --no-cache . -f Dockerfile_updated -t %name%/%name%:latest --squash
echo.
echo.
echo -----
echo Build complete.
echo Running the container in detached mode...
echo -----
docker run -d -p 8000:8000 --name %name% %name%/%name%
echo.
echo.
echo -----
echo Stopping the container and setting always restart...
echo -----
docker stop %name%
docker update --restart always %name%
echo.
echo.
echo -----
echo Pruning the Docker builder...
echo -----
docker builder prune -f
echo.
echo.
echo -----
echo Finished.
echo.
echo Go to Docker Containers and press the play button to start the container.
echo -----
echo.
pause
exit /b

0 comments on commit 780eb23

Please sign in to comment.