Installation docker-compose on CentOS 7.9

一、Installation docker-compose on CentOS 7.9

1 地址

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

 

posted @   娇小赤雅  阅读(294)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫
点击右上角即可分享
微信分享提示