“Docker -Befehle” Code-Antworten

Docker -Befehle

Docker Commands v2.1 by BVieira
-forked from Basel Rabia

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
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
___
8. `docker images` # list the images
9. `docker push` # push your image to docker repo
10. `docker pull` # download an image from docker repo
11. `docker commit` # create an image from container
12. `docker rmi` # remove image
___
13. `docker volume` # create a docker volume
14. `docker network` # create a docker network
15. `docker build` # build a new image from dockerfile
___

16. Clean, stop, reset, purge and remove all traces of Docker in your environment

#Select all commands below and paste on terminal

```
docker stop $(docker ps -q)
docker rm -f $(docker ps -aq)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls -q) 
docker network rm $(docker network ls -q)
docker volume prune  
docker system prune -a 
```
BVieira

Docker -Befehle

$ docker images
  REPOSITORY   TAG        ID
  ubuntu       12.10      b750fe78269d
  me/myapp     latest     7b2431a8d968
Better Buzzard

Docker -Befehle

docker run [options] IMAGE
  # see `docker create` for options
Better Buzzard

Docker -Befehle

WORKDIR /myapp
Better Buzzard

Docker -Befehle

docker exec [options] CONTAINER COMMAND
  -d, --detach        # run in background
  -i, --interactive   # stdin
  -t, --tty           # interactive
Better Buzzard

Docker -Befehle

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

Docker -Befehle

EXPOSE 5900
CMD    ["bundle", "exec", "rails", "server"]
Better Buzzard

Docker -Befehle

docker start [options] CONTAINER
  -a, --attach        # attach stdout/err
  -i, --interactive   # attach stdin

docker stop [options] CONTAINER
Better Buzzard

Docker -Befehle

$ docker ps
$ docker ps -a
$ docker kill $ID
Better Buzzard

Docker -Befehle

$ docker images -a   # also show intermediate
Better Buzzard

Ähnliche Antworten wie “Docker -Befehle”

Fragen ähnlich wie “Docker -Befehle”

Weitere verwandte Antworten zu “Docker -Befehle” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen