Skip to content

Support for :max-retries in restart #185

@d0b3rm4n

Description

@d0b3rm4n

The docker-compose allows to set a a max-retries in the the restart configuration.

https://docs.docker.com/reference/compose-file/services/#restart

on-failure[:max-retries]: The policy restarts the container if the exit code indicates an error. Optionally, limit the number of restart retries the Docker daemon attempts.

Having a compose file like:

services:
  db:
    image: docker.io/library/postgres:17
    restart: on-failure:5

causes an error like this:

$ podlet compose container-compose.yml
Error: 
   0: error converting compose file
   1: error reading compose file
   2: File `container-compose.yml` is not a valid compose file
   3: unknown variant `on-failure:5`, expected one of `no`, `always`, `on-failure`, `unless-stopped`

Location:
   ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/podlet-0.3.1/src/cli/compose.rs:219

Would be nice to get support also in potlet, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedWaiting on something else to resolvequestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions