Hi everyone.
When computer start or restart, Docker Engine also start but not the container (CodePriject/ai-server) witch must be started manually.
In the event of absence, this quickly leads to a saturation of alarm messages witch ends up blocking the computer.
There are similar topics about that (for example “General discussions docker Aug 2023”, but I do not known where is the option “-restart=always” for a container.
Can anyone help me as I’m far from being a computer expert…
Many thanks in advance.
Windows 11 pro last version
Docker Desktop last version (V4.28.0)
WSL2 based engine (WSL2-Kernel), virtualisation, …
CUDA 11.7 win 11 64bits
Subsystem for LINUX
What port? You didn’t share what command you ran before adding the restart policy and didn’t mention any port.
You can’t. But why would it be deleted? How is that related to staring containers automatically? You will need to share more context in order to get better answers.
docker run --restart=always codeproject/ai-server:gpu
You started a container without a volume, and therefore without a way to persist the data outside the container.
Of course, deleting a container without volumes will result in a deletion of the container filesystem → all data from the container is gone.That’s why people use volumes to persist application data outside the container: https://docs.docker.com/reference/cli/docker/container/run/#volume
I am a little lost. I started the whole process again today but the result is not good. Attached are screenshots in chronological order of what I did today.
The first one (docker desktop before) is the container ( hardcore-spence) that is working perfectly and that i want to restart auto.
2 docker run command with restart and port options
3 and 4 the run
5 docker desktop after run : a new container is build (vigorous-chaplygin) but without the ports è why?
6 docker ps : there is no ‘UP ‘ or ‘Restarting’ for that new container
7 docker desktop images with optional settings to have the ports 3218:32168
8 docker desktop : there is AGAIN a new container (silly- mendeleev) whitch is working ok
9 docker event = nothing to see
10 after restart the computer : it restart not the good one (silly-mendeleev) but the first on created (vigourous-chaplygin) , that without port -à not working
11 desktop ps: again without ‘UP ‘ or ‘Restarting’ for that container
In transmitted file #3 (the run of docker run command) there is a line starting with “Warn Overriding address(es) ‘http://+:32168, http://+:5000’ Binding to endport… …”
What does it mean?
Hence two questions:
Is this why the container created (vigorous-chaplyngin) does not have the port requested (32168:32168) in the run command? If this is indeed the case, where is my error in the docker run command?
Why in docker ps, it does not indicate the ‘up’ or ‘restarting’ flag? Which nevertheless seems to work (see transmitted file #10 and 11)
I hope so The comment in my last post is a response to @rimeleks post.
Please do not post text content as screenshot. It makes it unnecessary hard to read. I personally don’t look at them, as they are inconvenient to read.
Also, please format the commands and output properly, by wrapping them in a Preformated text block (</> icon, for some people hidden underneath the menu of the gear icon).
Once you post the details properly formatted, I will take a look.
HI,
I don’t understand what you mean by “a Preformated text block (</> icon, for some people hidden underneath the menu of the gear icon)”. I don’t know how to do this.
Anyway, here, in text and without copying logs and without screenshots, is what is happening:
Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.
Example code block:
```
echo "I am a code."
echo "An athletic one, and I wanna run."
```