Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to Docker Compose V2 using 'docker compose' #70

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

govekk
Copy link
Contributor

@govekk govekk commented Nov 15, 2023

Since July 2023, Docker Compose V1 (docker-compose) is no longer included in Docker Desktop, and it is highly recommended to migrate to Docker Compose V2 (docker compose).

Tested on my Docker (version 20.10.19) installation on Linux: docker-compose was not automatically aliased to docker compose so .omero/docker cli failed previously. After changing to docker compose, tests passed. This should work on all currently supported versions of Docker (according to their migration page linked above), but would be nice for someone on Windows (@erickmartins?) to confirm.

Another option would be to replace with docker compose --compatibility which keeps the container naming scheme of V1, if any tests refer to hard-coded container names. But both ran fine for me and I don't know how long --compatibility will be supported.

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, first specified,
                                   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 service 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.
@erickmartins erickmartins merged commit 3a1c056 into ome:main Nov 16, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants