Current Size:
Chakra BreakPoints
base0px
sm480px
md768px
lg992px
xl1280px
2xl1536px
Current Height:Width
widthpx
heightpx

Subjects

Docker Container Networking

Date Created: 2023/03/03

Last Update: 2023/03/03

#cheatsheet #docker #notes #networking

Networking containers enable a containerized app to communicate with the outside world. In many cases a given app may be dependent on a database or multiple services. We can "expose" to enable these interactions.

Expose

Dockerfile

dockerfile
...
EXPOSE 8080
...

We can also expose multiple ports

dockerfile
...
EXPOSE 80
EXPOSE 8080
EXPOSE 5432
...

CLI and Run Time

At docker start

At docker run

docker run --expose=8080 --name="port-demo" test

Reference

Docker Expose Ports - mend.io

More Notes

All Notes
HomeProjects

Links

Home Articles Notes Projects About Style Guide Site Credits

Contact

 [email protected]

Location

🌎 Earth