Skip to content

dudimasta/cs_app_in_docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Routines to run in a docker container

  1. If you try to run docker on a VM, then from host run: i. Set-VMProcessor [VMName] -ExposeVirtualizationExtensions $true

  2. Restore packages: i. dotnet build --no-cache

  3. Publish .NET app: i. .NET CLI: dotnet publish -c Release

  4. build for docker i. console: docker build -t foobar_core_01containerreg.azurecr.io/foofar_core_01-image -f Dockerfile .

  5. Manage a container - sample commands: i. docker start foofar_core_01 i. docker stop foofar_core_01 i. docker attach --sig-proxy=false foofar_core_01 i. docker stop foofar_core_01 i. delete: docker rm foofar_core_01

  6. Push to Azure Container Registry i. az login --use-device-code --tenant [MY-TANANT-UUID] i. az acr login --name fooBar_core_01containerreg i. optionally (if did not tag before): docker tag foofar_core_01-image fooBar_core_01containerreg.azurecr.io/foofar_core_01-image i. docker push fooBar_core_01containerreg.azurecr.io/foofar_core_01-image

#Usefull commands:

  • docker images - lista zainstalowanych obrazów
  • docker ps -a - lista kontenerów zainstalowanych (uruchomionych i zatrzymanych)
  • docker start [id]
  • docker stop [id]
  • docker attach [id] - podłączenie pod stdio
  • docker exec -it [id] bash - połączenie do basha kontenera

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published