PDF Google Drive Downloader v1.1


Báo lỗi sự cố

Nội dung text Docker Interview Questions


A. We will docker -p [host-port]:[container-port] option Q. How can you get the shell access of a running container? A. We need to issue docker exec -it [container-ID] bash command to get inside of the container. Here i means input t means terminal. Q. What is the difference between RUN and CMD? A. RUN is the instruction executed at the time of image creation, CMD is the instruction executed at the time of Container creation. CMD commands keep the container running. RUN is used to install packages, configure something at the time of image creation. Q. What is Dockerfile? A. Dockerfile is the declarative way of creating our own images. We need to use Dockerfile instructions to create the image. Declarative means whatever we write we will get that provided we follow correct syntax. Q. How do you build Docker images? A. We need to use docker build -t [REPO-URL]/[USERNAME]/[IMAGE-NAME]:version . We should have Dockerfile available in the directory where we run docker build command. Q. What is the difference between ADD vs COPY? A. ADD and COPY do the same, copying the files from local to container. But ADD has some extra capabilities. 1. ADD can download the resources from the internet to Container.

Tài liệu liên quan

x
Báo cáo lỗi download
Nội dung báo cáo



Chất lượng file Download bị lỗi:
Họ tên:
Email:
Bình luận
Trong quá trình tải gặp lỗi, sự cố,.. hoặc có thắc mắc gì vui lòng để lại bình luận dưới đây. Xin cảm ơn.