This repository has been trending on GitHub. I appreciate your support.
Buy the book (Painless Docker):
Read this in other languages: English, Russian, Persian, Chinese
For more information, see here
curl -sSL https://get.docker.com/ | sh
For more information, see here
Use this link to download the dmg.
https://download.docker.com/mac/stable/Docker.dmg
Open the downloaded file and follow the installation instructions.
For more information, see here
Use the msi installer:
https://download.docker.com/win/stable/InstallDocker.msi
Open the downloaded file and follow the installation instructions.
docker login
docker login localhost:8080
docker logout
docker logout localhost:8080
docker search nginx
docker search --filter stars=3 --no-trunc nginx
docker image pull nginx
docker image pull eon01/nginx localhost:5000/myadmin/nginx
docker image push eon01/nginx
docker image push eon01/nginx localhost:5000/myadmin/nginx
-Start an ubuntu:latest image
- Bind the port
80from the CONTAINER to port3000on the HOST- Mount the current directory to
/dataon the CONTAINER- Note: on windows you have to change
-v ${PWD}:/datato-v "C:\Data":/data
docker container run --name infinite -it -p 3000:80 -v ${PWD}:/data ubuntu:latest
docker container create -t -i eon01/infinite --name infinite
docker container run -it --name infinite -d eon01/infinite
docker container rename infinite infinity
docker container rm infinite
A container can be removed only after stopping it using docker stop command. To avoid this, add the --rm flag while running the container.
docker container update --cpu-shares 512 -m 300M infinite
docker exec -it infinite sh
In the example above, bash can replace sh as an alternative (if the above is giving an error).
docker container start nginx
docker container stop nginx
docker container restart nginx
docker container pause nginx
docker container unpause nginx
docker container wait nginx
docker container kill nginx
docker container kill -s HUP nginx
docker container attach nginx
Shortest way:
docker ps
Alternative:
docker container ls
docker ps -a
docker container ls -a
docker logs infinite
docker container logs infinite -f
docker container inspect infinite
docker container inspect --format '{{ .NetworkSettings.IPAddress }}' $(docker ps -q)
docker system events infinite
docker container port infinite
docker container top infinite
docker container stats infinite
docker container diff infinite
docker image ls
docker build .
docker build github.com/creack/docker-firefox
docker build - < Dockerfile
docker build - < context.tar.gz
docker build -t eon/infinite .
docker build -f myOtherDockerfile .
curl example.com/remote/Dockerfile | docker build -f - .
docker image rm nginx
docker image load < ubuntu.tar.gz
docker image load --input ubuntu.tar
docker image save busybox > ubuntu.tar
docker image history
docker container commit nginx
docker image tag nginx eon01/nginx
docker image push eon01/nginx
docker network create -d overlay MyOverlayNetwork
docker network create -d bridge MyBridgeNetwork
docker network create -d overlay \
--subnet=192.168.0.0/16 \
--subnet=192.170.0.0/16 \
--gateway=192.168.0.100 \
--gateway=192.170.0.100 \
--ip-range=192.168.1.0/24 \
--aux-address="my-router=192.168.1.5" --aux-address="my-switch=192.168.1.6" \
--aux-address="my-printer=192.170.1.5" --aux-address="my-nas=192.170.1.6" \
MyOverlayNetwork
docker network rm MyOverlayNetwork
docker network ls
docker network inspect MyOverlayNetwork
docker network connect MyOverlayNetwork nginx
docker container run -it -d --network=MyOverlayNetwork nginx
docker network disconnect MyOverlayNetwork nginx
Using Dockerfile, you can expose a port on the container using:
EXPOSE <port_number>
You can also map the container port to a host port using:
docker run -p $HOST_PORT:$CONTAINER_PORT --name <container_name> -t <image>
e.g.
docker run -p $HOST_PORT:$CONTAINER_PORT --name infinite -t infinite
You can find more nformation on Snyk's 10 Docker Image Security Best Practices blog post.
docker container rm nginx
docker container rm -v nginx
docker container rm $(docker container ls -a -f status=exited -q)
docker container rm `docker container ls -a -q`
docker image rm nginx
docker image rm $(docker image ls -f dangling=true -q)
docker image rm $(docker image ls -a -q)
docker image rm -f $(docker image ls | grep "^<none>" | awk "{print $3}")
docker container stop $(docker container ls -a -q) && docker container rm $(docker container ls -a -q)
docker volume rm $(docker volume ls -f dangling=true -q)
docker system prune -f
docker system prune -a
curl -ssl https://get.docker.com | bash
docker swarm init --advertise-addr 192.168.10.1
docker swarm join-token worker
docker swarm join-token manager
docker service ls
docker node ls
docker service create --name vote -p 8080:80 instavote/vote
docker service ps
docker service scale vote=3
docker service update --image instavote/vote:movies vote
docker service update --force --update-parallelism 1 --update-delay 30s nginx
docker service update --update-parallelism 5--update-delay 2s --image instavote/vote:indent vote
docker service update --limit-cpu 2 nginx
docker service update --replicas=5 nginx


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。


稳定高效的流量提升解决方案,助力品牌曝光
稳定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频


实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。


选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。


最强AI数据分析助手
小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。


像人一样思考的AI智能体
imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号