forked from lapwat/nfcscreenoffpatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker Container setup for Windows, after Docker has been installed.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |