cancel
Showing results for 
Search instead for 
Did you mean: 
_devnull_
Cadet
Cadet
  • 96 Views

ch02s06 / lab basics-exposing

Hi,

in this Guided Exercise it says in section 3.1 to create the times-app container with port 8080 exposed to the host (in bold below):

podman run --name times-app \
--network cities -p 8080:8080 -d \
registry.ocp4.example.com:8443/redhattraining/podman-info-times:v0.1

To my understanding, this exposure is not necessary. Otherwise there is no sense in launcing a new container in the cities network just to run curl to test the times-app (section 3.3 of the exercise) as you could test the same from the host by running

curl -s http://localhost:8080/times/BKK

 

 

Wouldn't it make more sense to isolate the times-app container in the cities network and NOT expose it's port to the host ? The cities-app will work the same, even if the times-app is only available on the cities network.

Regards
Marc

0 Kudos
0 Replies
Join the discussion
You must log in to join this conversation.