Docker Host Port Mapping


This is the task:

a. Pull nginx:alpine-perl docker image on Application Server 2 .
b. Create a container named demo using the image you pulled.
c. Map host port 8088 to container port 80 . Please keep the container in running state.

I did the following:

  1. docker pull nginx:alpine-perl
  2. docker create --name demo -p 8080:80 nginx:alpine-perl
  3. docker start

My container was running but i dot the error:
- container port ‘80’ is not mapped to docker host port ‘8088’ on Application Server 2

Why was this wrong?

Map host port 8088 to container port 80
You mapped 8080 if this is not the typo :slight_smile:

Thanks! :slight_smile::frowning:

Have you checked this? by running this command ``docker ps``` ?

awww typo :confused:

1 Like