Scripts/Docker.ps1


# https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-server-1



# docker pull lordmilko/prtg
docker pull mcr.microsoft.com/windows/servercore:ltsc2022



# Images weergeven
docker images

# Containers weergeven
docker container ls -a

## Gestopte containers verwijderen
docker container prune
docker container prune -f


# Docker container bouwen
Set-Location C:\Docker\PrtgDocker-master
docker build . -t prtg

# Docker container maken en starten
docker run --name prtg -m 4G -d -it -p 8080:80 --restart unless-stopped prtg

# Docker container starten
docker container start prtg


# Docker container bedienen
docker exec -ti prtg powershell


# Dcoker container backup
docker container commit prtg prtgbackup:backup
docker image save -o prtgbackup.tar prtgbackup

# Docker image restore
docker image load prtgbackup.tar