DevOps Classroomnotes 23/Jun/2022

Docker networking

  • Lets create two docker containers
    Preview
  • Refer Here for formatting the outputs of inspect section
  • Now lets find their ip addresses
    Preview
  • Now lets get the ip address of the host (machine where is docker is installed)
    Preview
  • Lets find if the container can be pinged from the host
    Preview
  • Lets find if the networking between two containers is working or not
    Preview
  • Containers by default can communicate with each other using ip addresses but not by names.
  • The bridge network is created by default when we install docker
    Preview
    Preview
    Preview
  • Lets create a new bridge network
    Preview
  • create two containers on the new bridge network
    Preview
    Preview
    Preview
  • The corrected version of nopcomerce
FROM mcr.microsoft.com/dotnet/aspnet:6.0
ADD https://github.com/nopSolutions/nopCommerce/releases/download/release-4.50.3/nopCommerce_4.50.3_NoSource_linux_x64.zip /Nop/nopCommerce_4.50.3_NoSource_linux_x64.zip
WORKDIR /Nop
RUN apt update && apt install unzip -y && mkdir /Nop/bin && mkdir /Nop/logs && unzip ./nopCommerce_4.50.3_NoSource_linux_x64.zip
EXPOSE 80
CMD ["/usr/bin/dotnet", "/Nop/Nop.Web.dll"]

Exercise

  • Try create mysql and phpmyadmin in the same network and establish connection using host name (Create a bridge network)

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner