Hello,
I ran into a problem while using container OS’s with macvlans:
I am trying to map a port to the OS (in my case the latest Ubuntu) but it wont map it afterwards.
The command i used:
If you run this command, as is, without messing with macvlan (and without specifying a --net or --ip), you’ll be able to access your container on your host’s IP address through port 8080, with no special configuration. This is kind of the normal way to use Docker; will this approach not work for you?
To answer the question in the subject line, it’s very unusual to want to “ssh to a container”: normally a container only runs a single process (in your case probably the Web server on port 80) and not a full stack of OS daemons, and maintaining the key material securely is very difficult. For debugging purposes you can ssh to the host and docker exec into the container.
Thanks for the reply.
I need my container to have an individual ip address. Because i want to run more than one of the same kind at once. So the container itself is worthless to me without an IP address. Any suggestions how to do so?