Difference between revisions of "Docker run"
Jump to navigation
Jump to search
↑ https://hub.docker.com/_/nginx
Line 11: | Line 11: | ||
[[--link]] (deprecated) (See also: Kibana/[[Install Kibana using docker]]) | [[--link]] (deprecated) (See also: Kibana/[[Install Kibana using docker]]) | ||
[[--privileged]] | [[--privileged]] | ||
+ | --group-add $([[getent]] group docker | cut -d: -f3) | ||
== Examples == | == Examples == |
Revision as of 12:52, 27 September 2020
docker run IMAGE|IMAGE_ID
* https://docs.docker.com/engine/reference/run/
-e (Environment variables) -d detach -v -p --name --user --link (deprecated) (See also: Kibana/Install Kibana using docker) --privileged --group-add $(getent group docker | cut -d: -f3)
Examples
docker run alpine
docker run -it alpine /bin/sh
docker run -v NEW_VOLUME_NAE:/path/inside/container -it alpine /bin/sh
docker run --name zabbix-appliance -p 80:80 -p 10051:10051 -d zabbix/zabbix-appliance:latest
docker run -it --name teamcity-server-instance -v /YOUR_FOLDER_TO_DATA:/data/teamcity_server/datadir -v /YOUR_FOLDER_TO_LOGS:/opt/teamcity/logs -p 8111:8111 jetbrains/teamcity-server
docker run -d --name=grafana -p 3000:3000 grafana/grafana
(Docker-compose.yml (Grafana))docker run -p 9000:9000 minio/minio server /data
docker run -d --log-driver=journald YOUR_CONTAINER
docker run --name my-custom-nginx-container -v /host/path/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx
[1]docker run --name some-nginx-name -d -p 8080:80 some-content-nginx-image
docker run --rm -it -v ~/pipeline/:/usr/share/logstash/pipeline/ docker.elastic.co/logstash/logstash:7.8.0
docker run -t -u `id -u` \ -v $HOME/.ssh/id_rsa:/opt/app-root/src/.ssh/id_rsa:Z \ -v $HOME/ansible/hosts:/tmp/inventory:Z \ -e INVENTORY_FILE=/tmp/inventory \ -e PLAYBOOK_FILE=playbooks/prerequisites.yml \ -e OPTS="-v" \ registry.redhat.io/openshift3/ose-ansible:v3.11
Runtime constraints on resources
-m --memory=""
--oom-kill-disable=false
Whether to disable OOM Killer for the container or not.--cpus=0.000
https://medium.com/@oprearocks/how-to-properly-override-the-entrypoint-using-docker-run-2e081e5feb9d
docker run --entrypoint "/bin/ls" debian -al /root
docker run -it --entrypoint /usr/bin/redis-cli example/redis --help
docker run -dit --rm --privileged --name dind docker:dind
Activities
- Understand the difference between
docker start
anddocker run
: https://stackoverflow.com/questions/34782678/difference-between-running-and-starting-a-docker-container. See also runC - Understand Start configuration behavior and restart policy
Related terms
docker start
docker pull
- dockerd
- /var/run/docker.pid
- /var/run/docker.sock
- PortBindings
docker volume
docker-compose.yml
DOCKER_OPTS="--dns 8.8.8.8"
See also
docker start
- Docker Volumes:
docker volume ls
,docker volume create
,docker volume inspect
,docker volumes prune
,docker volume create
,docker volume rm
,docker system df
,mounts
,--volumes-from
- Docker:
docker-compose
, Docker Desktop, Docker Scout, Docker Swarm, Docker Volumes, Docker images management, docker network,docker inspect
,docker volume inspect
,Dockerfile
, Docker Engine release notes,docker kill
,moby
, Docker-in-Docker,docker context
,buildx
,docker tag
,docker system prune
, Docker Hub,hub-tool, /etc/docker/daemon.json
,hostconfig.json
, dockerd, logs, Docker logging, Backup,docker service
,depends on
,--dns, --filter
,--mount
,docker login
,docker build
,apt remove docker.io
,.dockerignore
, docker context ls |docker-machine, .docker/
, PWD,$HOME/.docker/config.json
, Docker ID,--env-file, docker --help
Advertising: