« Back to projectatomic.io
Ask Your Question

How to expose docker services to the other machines?

asked 2015-09-23 13:19:02 +0000

wst gravatar image

I have VMware machine with Atomic installed (CentOS-Atomic-Host-7-Installer.iso ). I created container using https://hub.docker.com/r/library/mysql/ image. I can see in docker logs that container started correctly and is listening on socket *:3306

# docker logs test-mysql
2015-09-23 11:28:37 1 [Note] Server hostname (bind-address): '*'; port: 3306

Now, I can access Atomic host from my local PC through ssh port 22. Unfortunately any other port doesn't seem to be opened. How can I access mysql container (and any other containers) from my local PC?

Sorry if my question is trivial but I am new to containers. If there is any documentation, possibly with examples, I'd be grateful. If not, I'd appreciate any help. Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-09-23 16:07:34 +0000

razyr gravatar image

You might want to start here.


edit flag offensive delete link more


Thanks for link! After I read this "docker run -p 3306:3306 ..." did the trick.

wst ( 2015-09-24 12:21:33 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2015-09-23 13:19:02 +0000

Seen: 163 times

Last updated: Sep 23 '15