Installation docker-compose on CentOS 7.9
一、Installation docker-compose on CentOS 7.9
1 地址
- https://github.com/docker/compose
- https://github.com/docker/compose/releases/download/v2.1.0/docker-compose-linux-x86_64
2 wget 下载
mkdir /opt/software && cd /opt/software
wget https://github.com/docker/compose/releases/download/v2.1.0/docker-compose-linux-x86_64
wget https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64
3 移动并修改包名
mv /opt/software/docker-compose-linux-x86_64 /usr/local/bin/docker-compose
4 赋运行权限
sudo chmod +x /usr/local/bin/docker-compose
5 查看版本
docker-compose version
6 删除docker-compose
sudo rm -rf/usr/local/bin/docker-compose
7 帮助命令
[root@ecs-65685 ~]# docker-compose --help
Usage: docker compose [OPTIONS] COMMAND
Docker Compose
Options:
--ansi string Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
--compatibility Run compose in backward compatibility mode
--env-file string Specify an alternate environment file.
-f, --file stringArray Compose configuration files
--profile stringArray Specify a profile to enable
--project-directory string Specify an alternate working directory
(default: the path of the Compose file)
-p, --project-name string Project name
Commands:
build Build or rebuild services
convert Converts the compose file to platform's canonical format
cp Copy files/folders between a service container and the local filesystem
create Creates containers for a service.
down Stop and remove containers, networks
events Receive real time events from containers.
exec Execute a command in a running container.
images List images used by the created containers
kill Force stop service containers.
logs View output from containers
ls List running compose projects
pause Pause services
port Print the public port for a port binding.
ps List containers
pull Pull service images
push Push service images
restart Restart containers
rm Removes stopped service containers
run Run a one-off command on a service.
start Start services
stop Stop services
top Display the running processes
unpause Unpause services
up Create and start containers
version Show the Docker Compose version information
Run 'docker compose COMMAND --help' for more information on a command.
X、One Step Success
Y、Error message
Z、Related Links
标签:
docker
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫