0

I have a webserver running on port 80 , however I need the site to be accessed using 172.16.21.2:8080 , regardless of what port mapping i specify it is always accessed using port 80. How can i make my containers be accessed than a different port than 80.

version: '3' services: apache: image: httpd:latest networks: LAN: ipv4_address: 172.16.21.2 ports: - "8080:80" restart: always volumes: - ./html:/usr/local/apache2/htdocs networks: LAN: external: true 

1 Answer 1

0

The line - "8080:80" specifies that port 80 on the container shall be mapped to port 80 on the post. Change the 80 to whatever port you want, e.g. port 8080. based on your question.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.