0

I have a Google Cloud instance with internal and external IP addresses:

hostname -I

10.......5 172......1

The first is the internal and the second is the external IP.

When I create a docker container and run the same command I get:

hostname -I

172......2

I want to scp data between two Google Cloud machines, and I want to make sure I'm not incurring any egress. How can I make sure the docker container uses the internal IP address in Google Cloud?

Thanks!

James Pinkerton
  • 161
  • 2
  • 14

1 Answers1

0

You can expose a port in the host from your docker, as per this example but for an nginx. You can use Host Networking for your purpose.

This is explained in this thread already

Thrahir
  • 98
  • 7