Yuav tsum docker yuav tsum tau sau npe?

Cov txheej txheem:

Yuav tsum docker yuav tsum tau sau npe?
Yuav tsum docker yuav tsum tau sau npe?
Anonim

Siv peev. PebCov cim yuav tsum tau sau nrog lub peev xwm tsim nyog raws li qhia hauv cov lus qhia no. Piv txwv li: "Docker". Docker tej zaum yuav raug sau ua ntawv qis li 'docker' tsuas yog thaum kev siv qhia meej meej rau kab lus txib.

Kuv sau Dockerfile li cas?

Kauj Ruam 2: Tsim Dockerfile

  1. Tsim cov duab pib nrog Python 3.7 duab.
  2. Set the working directory to /code.
  3. Tsim ib puag ncig hloov pauv siv los ntawm cov lus txib ntawm lub hwj.
  4. Nruab gcc thiab lwm yam kev vam khom.
  5. Copy requirements.txt thiab nruab Python dependencies.

Koj npe tus docker li cas?

Tam sim no koj tuaj yeem muab cov npe nco qab rau koj cov ntim khoom siv new -name chij rau docker khiav. Yog tias tsis muaj npe tau teev tseg Docker yuav cia li tsim ib lub npe. Thaum koj txuas ib lub thawv rau lwm qhov koj yuav tau muab lub npe thiab lub npe ntawm tus menyuam uas koj xav tau txuas rau ntawm -link child_name:alias.

Peb puas tuaj yeem hloov npe Dockerfile?

Koj tuaj yeem hloov npe koj cov duab docker los ntawm docker tag command.

Kuv tuaj yeem siv docker li cas?

Kev taw qhia thiab teeb tsa

  1. Tsim thiab khiav ib daim duab ua lub thawv.
  2. Qhia cov duab siv Docker Hub.
  3. Deploy Docker daim ntawv thov siv ntau lub ntim nrog lub database.
  4. Khiav daim ntawv thov siv Docker Compose.

Pom zoo: