Skip to content

Support runtime in v3.x compose files #6239

Closed

Description

@mathstuf

Description of the issue

The runtime option exists in v2.3, but not v3.x.

Activity

  1. bhack commented on Nov 9, 2018

    @bhack

    The lack of runtime selection it is creating many portability problems at Docker build time. See docker-archive-public/docker.app#241 (comment)

  2. xkortex commented on Mar 2, 2019

    @xkortex

    I am not particular how it is implemented, but I would really appreciate using compose v3.X with CUDA GPU containers. My current choice is either DC.yml v2.X files, or Makefiles.

  3. qhaas commented on Jul 24, 2019

    @qhaas

    This is likely now OBE given how nvidia has altered nvidia-docker, see #6691

    That is... assuming folks were only using runtime for nvidia-docker...

  4. mathstuf commented on Jul 24, 2019

    @mathstuf
    Author

    I was interested in it for OCI hooks personally, but have ended up not going with docker-compose anyways, so this sort of fell off my plate. Guidance for continuing this is over on #6240.

  5. stale commented on Jan 20, 2020

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  6. stale commented on Jan 27, 2020

    @stale

    This issue has been automatically closed because it had not recent activity during the stale period.

  7. EscapeLife commented on Jan 28, 2020

    @EscapeLife

    Why is it closed?

  8. qhaas commented on Jan 28, 2020

    @qhaas

    Why is it closed?

    Most of the discussion has moved to #6691 since the API changed with newer versions of docker/nvidia-docker, breaking even v2.3 (without adding deprecated/legacy packages).

  9. EscapeLife commented on Feb 2, 2020

    @EscapeLife

    Why is it closed?

    Most of the discussion has moved to #6691 since the API changed with newer versions of docker/nvidia-docker, breaking even v2.3 (without adding deprecated/legacy packages).

    Thanks U

  10. khimaros commented on Apr 21, 2020

    @khimaros

    Is there a workaround for this? I'd like to use the runtime parameter to configure specific containers to run with runsc (gVisor).

  11. robbmue commented on Jul 22, 2020

    @robbmue

    Most of the discussion has moved to #6691 since the API changed with newer versions of docker/nvidia-docker, breaking even v2.3 (without adding deprecated/legacy packages).

    But what if i want to use another runtime in my docker-compose files? I e.g. am trying to use Kata as my runtime, but would like to use features from v3.x as well. Am stuck with v2.3 to set my runtimes.

  12. EricHripko commented on Jul 22, 2020

    @EricHripko

    v2 and v3 formats are being merged: #7588. This should enable you to use runtime key (for now) in combination with newer features 🙂

  13. AkihiroSuda commented on Sep 14, 2020

    @AkihiroSuda

    PR to support runtime in v3 spec officially: compose-spec/compose-spec#102

  14. leoluk commented on Sep 14, 2020

    @leoluk

    Glad to see some progress on this! Specifying runtime is a major blocker for us that keeps us on v2.

  15. EricHripko commented on Sep 16, 2020

    @EricHripko

    @leoluk if you try any 1.27.x release, you will be able to use v2/v3 functionality at the same time (which includes runtime).

  16. Motophan commented on Feb 8, 2021

    @Motophan

    #8107

    Not sure why this was closed, 1.28 essentially broke this so to speak. We need better documentation on this. Possible related issue

  17. mathstuf commented on Feb 9, 2021

    @mathstuf
    Author

    It was closed due to a stalebot (something I, personally, find to be of dubious utility on issues). No idea if upstream actually looks at closed issues with any interest to undo such decisions.

  18. mqu commented on Sep 20, 2022

    @mqu

    I can use "runtime: sysbox-runc" with docker-compose, using "version: 3.8", on debian/bullseye / backports and ubuntu/jammy.

    $ cat docker-compose.yml 
    version: '3.8'
    
    services:
       runner:
         image: gitlab/gitlab-runner:alpine
         restart: always
         runtime: sysbox-runc
        ...
    $ cat /etc/os-release  | grep CODENA
    VERSION_CODENAME=bullseye
    $ docker-compose -v
    docker-compose version 1.27.4, build unknown
    
    • on debian/bullseye, need to install docker-compose with backports : apt install -t bullseye-backports docker-compose
    • on ubuntu/jammy, work out of the box, with docker-compose version : 1.29.2
    $ docker-compose -v
    docker-compose version 1.29.2, build unknown
    $ dpkg -l | grep compose
    ii  docker-compose        1.29.2-1      all      define and run multi-container Docker applications with YAML
    
  19. laurazard commented on Sep 20, 2022

    @laurazard
    Member

    By the way, for the people in this thread that might not be aware:

    The runtime service-level key is supported (as documented here) by the Compose Specification (here).

    Using Docker Compose V2, with a compose.yaml that omits the version top-level key such as:

    services:
      app:
        image: alpine
        command: top
        runtime: sysbox-runc

    this option is respected and passed on to the docker daemon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions