i want mapping a port to host. what can i do?
Operating system
Rocky Linux release 8.10
Description
i want export the container port 8080 to host port 8080. what can i do?
Docker compose
services: windows: image: dockurr/windows container_name: windows environment: VERSION: "win11" devices: - /dev/kvm cap_add: - NET_ADMIN ports: - 8080:8080 - 3389:3389/tcp - 3389:3389/udp stop_grace_period: 2m
Docker log
no
Screenshots (optional)
No response
i have a windows application need export port 80. but i see 80 is used . also in windows container i used nginx proxy the 80 to 8080 . and then i want to another PC can visit to the port 8080 . thanks!
you can set at Docker-compose file ports:
- 8080:8080
- 3389:3389/tcp
- 3389:3389/udp if your port 8080 was used ,you can change another 9090:8080
i used the Docker-compose file with 8009: 8009 howerver i can not visit the 8009
My Docker compose: services: windows: image: dockurr/windows container_name: windows environment: VERSION: "win11" LANGUAGE: "Chinese" devices: - /dev/kvm cap_add: - NET_ADMIN ports: - 8006:8006 - 8009:8009 - 3389:3389/tcp - 3389:3389/udp stop_grace_period: 2m
i used the Docker-compose file with 8009: 8009 howerver i can not visit the 8009
My Docker compose: services: windows: image: dockurr/windows container_name: windows environment: VERSION: "win11" LANGUAGE: "Chinese" devices: - /dev/kvm cap_add: - NET_ADMIN ports: - 8006:8006 - 8009:8009 - 3389:3389/tcp - 3389:3389/udp stop_grace_period: 2m
i used the Docker-compose file with 8009: 8009 howerver i can not visit the 8009
My Docker compose: services: windows: image: dockurr/windows container_name: windows environment: VERSION: "win11" LANGUAGE: "Chinese" devices: - /dev/kvm cap_add: - NET_ADMIN ports: - 8006:8006 - 8009:8009 - 3389:3389/tcp - 3389:3389/udp stop_grace_period: 2m
It should be:
services:
windows:
image: dockurr/windows
container_name: windows
environment:
VERSION: "win11"
LANGUAGE: "Chinese"
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8009:8006
- 3389:3389/tcp
- 3389:3389/udp
stop_grace_period: 2m