Docker Community Forums

Share and learn in the Docker community.

Container shut down

I am run a windows container with a service and after build the image and run the container shut down… what can i do?

λ docker image build -t win .
Sending build context to Docker daemon 3.347MB
Step 1/6 : FROM
—> 2606a881cbae
Step 2/6 : WORKDIR “C:\teste”
—> Running in 3157ca5b641a
Removing intermediate container 3157ca5b641a
—> e07874026524
Step 3/6 : COPY . c:/teste
—> 5126e59e1108
Step 4/6 : RUN servico.bat
—> Running in daba843444f9
C:\teste>sc create “teste” binPath= “C:\teste\teste.exe” DisplayName= “teste”
[SC] CreateService SUCCESS
Removing intermediate container daba843444f9
—> cf0f96af3b8e
Step 5/6 : CMD net start teste
—> Running in 109ee6cbd4aa
Removing intermediate container 109ee6cbd4aa
—> 8ccdd094063d
Step 6/6 : EXPOSE 9293
—> Running in 5c274fc57ad7
Removing intermediate container 5c274fc57ad7
—> c2e6fcc6e283
Successfully built c2e6fcc6e283
Successfully tagged win:latest

Azure Container Registry – Docker Registry | Microsoft Azure
Store images for all types of container deployments using Azure Container Registry, and manage a Docker private registry as a first-class Azure resource.
docker run win
The teste service is starting…
The teste service was started successfully.
λ docker container ls -a
8f8c41764d08 win “cmd /S /C net start…” 32 seconds ago Exited (0) 20 seconds ago epic_khayyam