Docker Commands
Docker Commands
Docker run -it -d <image name> = to make container (it- interactive terminal) (d – detached
mode/background)
Docker run -it -d –name=<name for container> <image name>= for identification of
container/specifying container name (it creates new container Id)
Docker exec -it <container id> <container command> = to modify container(ubuntu - /bin/bash
alpine – ping 8000)
docker commit <container id> <username/new image name> = to create image name
Docker File
(To create image with the help of text file without docker commands)
FROM nginx:alpine
COPY . /usr/share/nginx/html
docker build -t <imgname> . = for creating new image {. For accessing all files}
Docker Network