How to map another port to an existing porter?

1

I'm starting to use docker, I created a container, when I ran it, I mapped port 8080: 80, because I only needed an Apache server, the problem is that I installed webmin and it runs in port 10000, how Can I add the 10000: 10000 map to the container that is already active? Thank you in advance for your help.

server@server:~$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                  NAMES
b8a73e695137        452a96d81c30        "/bin/bash"         2 hours ago         Up About a minute   0.0.0.0:8080->80/tcp   testserver
asked by Oscar Sierra 21.05.2018 в 02:37
source

1 answer

0

You have two ways, if you are running docker with docker run with -p you can map all the ports you want, example: docker run -p 8080: 80 -p 10000: 10000

If you are running from a docker-file:

version: "3.2"
services:
  nginx:
      image: nginx:latest          
      ports:
        - "8080:80"
        - "10000:10000"

You have to stop the container and recreate it.

    
answered by 22.05.2018 / 16:23
source