“Perintah Dasar Docker” Kode Jawaban

Perintah Dasar Docker

docker –version
docker pull
docker run
docker ps
docker ps -a
docker exec
docker stop
docker kill
docker commit
docker login
docker push
docker images
docker rm
docker rmi
docker build

1. `docker ps`  # current containers
2. `docker run` # create and start the container
3. `docker create` # create container
4. `dokcer exec` # to run commnads in container for once
EX: command docker exec -it <container name> /bin/bash
5. `docker stop [container ID]` # terminate the container and save it's state by commit it 
6. `docker rm [container ID]` # remove container 
7. `docker inspect [container ID]` # Get more info about running container
___
7. `docker images` # list the images
8. `docker push` # push your image to docker repo
9. `docker pull` # download an image from docker repo
10. `docker commit` # create an image from container
11. `docker rmi` # remove image
___
12. `docker volume` # create a docker volume
13. `docker network` # create a docker network
14. `docker build` # build a new image from dockerfile
Sirexxxxxx

Perintah Docker

ADD file.xyz /file.xyz
COPY --chown=user:group host_file.xyz /path/container_file.xyz
Better Buzzard

Perintah Docker

ENV APP_HOME /myapp
RUN mkdir $APP_HOME
Better Buzzard

Perintah Docker

RUN bundle install
Better Buzzard

Perintah Docker

$ docker create --name app_redis_1 \
  --expose 6379 \
  redis:3.0.2
Better Buzzard

Perintah Docker

ONBUILD RUN bundle install
# when used with another file
Better Buzzard

Jawaban yang mirip dengan “Perintah Dasar Docker”

Pertanyaan yang mirip dengan “Perintah Dasar Docker”

Lebih banyak jawaban terkait untuk “Perintah Dasar Docker” di Shell/Bash

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya