How network work in docker-compose?

How network works in docker-compose?

docker-compose creates a set of containers, brings them up along with a private network. The network is very interesting because a private network is essential to compose & test a microservice bases system.

I found the post quite useful.

Post Highlights

  • docker-compose creates a default network, if no network is specified.
  • The name of the network is <local dir>_default.
  • The default network type is bridge.
Bridge Network

A bridge is a layer 2 component. It understands segments and uses a hardware/software switch/bridge.

Host Network

Use the host network namespace. It is preferred for achieving high performance. It works on Linux only.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: