-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to expose the port when deploying the container in a swarm cluster? #11
Comments
Hi Shreyas, I'm not totally sure what's the issue, but it seems to me that you can't bound host's port Example:
|
No luck. :( [shreyas@rigel ~]$ docker service create --publish 49154:22 --name test_sshd2 rastasheep/ubuntu-sshd:14.04 |
Hi,
This image works perfectly fine when I pull the container with the "docker run" command.
I have a requirement to create an Ubuntu container with ssh capabilities on swarm cluster.
I am using the below command to do that.
docker service create --publish 22:22 --name test_sshd2 rastasheep/ubuntu-sshd:14.04
But this doesn't seem to help. The container is unable to get started.
[root@rigel lib]# docker service ps test_sshd2
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
88qf2piv799q test_sshd2.1 rastasheep/ubuntu-sshd:14.04 orion-01.local Ready Preparing less than a second ago
s48v2kgbph0o _ test_sshd2.1 rastasheep/ubuntu-sshd:14.04 orion-01.local Shutdown Rejected less than a second ago "No such image: rastasheep/ubu…"
j78z4m4ut8r1 _ test_sshd2.1 rastasheep/ubuntu-sshd:14.04 rigel.serc.iisc.in Shutdown Failed 16 seconds ago "starting container failed: su…"
mmi5f86804u3 _ test_sshd2.1 rastasheep/ubuntu-sshd:14.04 rigel.serc.iisc.in Shutdown Failed 26 seconds ago "starting container failed: su…"
fywjp6rgydx8 _ test_sshd2.1 rastasheep/ubuntu-sshd:14.04 rigel.serc.iisc.in Shutdown Failed 32 seconds ago "starting container
Any idea about how to go ahead with this?
Thanks in advance!
Shreyas
The text was updated successfully, but these errors were encountered: