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 @ 2022-11-15 22:13  娇小赤雅  阅读(242)  评论(0编辑  收藏  举报