What's the best way to make the container restart automatically when I reboot my PC?
I've just recently moved to Linux and I'm still a little bit of a noob.
I've just recently moved to Linux and I'm still a little bit of a noob.
I did no testing but if you add the parameter --restart=always on the first docker run it should.What's the best way to make the container restart automatically when I reboot my PC?
I've just recently moved to Linux and I'm still a little bit of a noob.
Doesn't seem to work :/I did no testing but if you add the parameter --restart=always on the first docker run it should.
If the container is already running or created the command is
docker update --restart=always <container>
Let me know if this work, I will test it later today.
Yep, just tested, without the = sign. Thanks.Try without the = sign. (docker --restart always yadns-nx) And you might have to reboot once after that.
For some reason, it's still not working for me, but the logs are really strange.Yep, just tested, without the = sign. Thanks.
I gonna update the first post.
So, if it's the first time running the docker
docker run --name yadns-nx -d -p 80:80 -p 53:53 -p 53:53/udp --restart always luiscassih/yadns-nx 192.168.1.27
If there's a container already running.
docker update --restart always yadns-nx (or the container id)
You can verify doing a docker inspect yadns-nx and looking for
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
}
After that, the docker will start within the service on the system startup.
For some reason, it's still not working for me, but the logs are really strange.
When I run docker inspect yadns-nx after a reboot, it suggests that the container is still running. However, I still get a name resolution error anytime I try to open a website. When I run "docker start yadns-nx" again, it works.
The logs from the inspect command don't change after I execute the start command though.
Here are the two logs:
"Status": "running"
PortBindings": {
"53/udp": [
{
"HostIp": "",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "",
"HostPort": "80"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
}
For some reason, it seems to work now. Maybe the system just needed one more rebootYep, it seems to be running OK with the ports OK and has the restart policy.Code:"Status": "running" PortBindings": { "53/udp": [ { "HostIp": "", "HostPort": "53" } ], "80/tcp": [ { "HostIp": "", "HostPort": "80" } ] }, "RestartPolicy": { "Name": "always", "MaximumRetryCount": 0 }
So, after the system reboots, if you do docker ps or docker container ls, nothing is shown? But doing an inspect show is theorically running? That's really wierd. Maybe do a docker logs and the container id, and check if there's an error?
If it's showing on docker ps, so it's running, you get that name resolution error on the Switch? You can at least connect to the WiFi network?
If the docker is running, going to "http://localhost:80" on the computer browser should show an "OK" message
The docker is public and should not require any account or login.Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/luiscassih/yadns-nx/manifests/latest: unauthorized: incorrect username or password
this was what i got after i put docker pull luiscassih/yadns-nx
The docker is public and should not require any account or login.
Maybe your docker service is already in the proccess of login with another account? Try doing a docker logout on the console and then do the docker pull again.
What OS are you using?
Hi !
I tried this DNS but i'm kind of new on docker.
I installed the docker toolkit (the one with virtual box).
When i run the image it give me a long string full of character, i think it's because it's running.
But the switch still can't find internet on my network. I used my ip that i found doing a ipconfig under my wifi network adapter but i have like 2 virtualbox adapter with ip too. Did i use the right one ?
When i changed the setting of my switch i put this ip in the dns section.
Is there some way to test if the dns working except from using my switch ?
Thx
Why would you want to do this?Is possible to use this on 3ds? I'm trying but it doesn't work.