actions-runner-controller icon indicating copy to clipboard operation
actions-runner-controller copied to clipboard

Upgrade docker to v23.x.x

Open elocke opened this issue 2 years ago • 7 comments

What would you like added?

It would be nice to upgrade the version of Docker being used to 23+ (current latest is 23.0.3) as this is the first major version of Docker using the new BuildKit backend by default, which offers a number of new features and improvements.

Why is this needed?

Buildkit by default would be nice to leverage as we are currently manually setting environment variables in many spots to enable it.

Additional context

Add any other context or screenshots about the feature request here.

elocke avatar Apr 08 '23 19:04 elocke

Hey @elocke! Although we try NOT to include every dependency present in the GitHub-hosted runner's VM images (https://github.com/actions/runner-images/blob/833ffa3aab68f80abf0b0e987e212f43da58f925/images/linux/Ubuntu2204-Readme.md?plain=1#L79-L80) to keep the image small, we do try to align the version numbers of included packages with the VM images. And apparently, GitHub's Ubuntu images are still stuck in Docker 20.10 so ours should too.

You might already know but the setup-buildx action enables you to install buildx so that you can use whatever feature provided by it. I do tend to switch which docker subcommand, build or buildx, to use per project, and I do remember we've relied on DOCKER_BUILDKIT envvar for enabling the use of buildx for the build subcommand.

Perhaps either or both of those are what you mentioned in "why is this needed?" section?

mumoshu avatar Apr 09 '23 22:04 mumoshu

Hey @mumoshu !

I experienced another use case where the upgrade of docker could be a great solution :

Why is this needed?

To be able to use docker compose command instead of docker-compose, we need to update docker in addition to use docker compose V2. Currently, the images are already using docker compose V2 but it's not possible to invoke it correctly with docker compose command.

Additional context

There is the result if I run these commands in a container with the summerwind/actions-runner-dind image for exemple:

$ docker version
Client:
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.18.10
 Git commit:        7155243
 Built:             Thu Jan 19 17:30:35 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.10
  Git commit:       6051f14
  Built:            Thu Jan 19 17:36:08 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.15
  GitCommit:        5b842e528e99d4d4c1686467debf2bd4b88ecd86
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d1
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

$ docker-compose version
Docker Compose version v2.16.0

$ docker-compose

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
      --parallel int               Control max parallelism, -1 for unlimited (default -1)
      --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
  config      Parse, resolve and render compose file in 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.

$ docker compose
docker: 'compose' is not a docker command.
See 'docker --help'

triskel78 avatar Apr 24 '23 09:04 triskel78

@mumoshu Going by the following, it looks like the Github Ubuntu images are now running Docker 24.x? We just ran into some issues moving to our self-hosted runners due to the Docker runtime being behind what's on Github hosted. Would love to see these updated to match when y'all are able!

  • https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#tools
  • https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#tools

jerius avatar Oct 03 '23 21:10 jerius

same issue affecting us. is there anything we can do to support?

remover avatar Nov 08 '23 09:11 remover

Also interested in this here!

Specifically we need the parity with Github managed runner images, and having docker-compose built in.

ohookins avatar Mar 06 '24 00:03 ohookins

I would now request v26 as it seems the --abort-on-container-failure flag gets rejected otherwise. (Note: the CLI version doesn't seem to actually matter here; you can have a CLI that doesn't report the flag successfully pass it down to the engine at least for CLI v24 against Engine v26.)

--abort-on-container-failure was introduced here: https://github.com/docker/compose/pull/11680

Should I open another issue? Or, @mumoshu, is this just kind of a wait and see.

l-monninger avatar Jun 20 '24 07:06 l-monninger