K
K
kiranananda2019-01-31 13:22:23
Docker
kiranananda, 2019-01-31 13:22:23

Docker swarm not accessing by ports?

Hello!
Something completely blunted or is this a reason to study all the same kubernetes ...
I raise the swarm I start
docker swarm init --advertise-addr 10.92.60.151
the service as in the docks on the docker

docker service create --name registry --publish published=5000,target=5000 registry:2

curl http://localhost:5000/v2/
curl: (7) Failed to connect to localhost port 5000: Connection refused

Same for 10.92.60.151.
docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
04u3wf9g0oy9        registry            replicated          1/1                 registry:2          *:5000->5000/tcp

Diatribe ubuntu 18.04. I tried it as a regular docker, and it is currently installed from the docker turnip.
Ideally, I wanted to assemble a cluster of 3 managers in order to get fault tolerance ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kiranananda, 2019-01-31
@kiranananda

The answer is found, I killed 5 hours. I decided to roll the virtual machine again. All of a sudden I think it's not. And so it was.
To change the hostname in Ubuntu, all the docks say to edit the /etc/cloud/cloud.cfg file, in particular,
change the line to true.
After that, everything stops working. I didn't understand it thoroughly, but it's enough to solve the problem :)...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question