Skip to content

"docker: Conflicting options: --restart and --rm" #749

@artemgordinskiy

Description

@artemgordinskiy

I get this error when I try to SSH into one of my application containers if its options include restart: unless-stopped.

Reproduction steps:

  1. Update a server configuration in deploy.yml to have the following option:
options:
  restart: unless-stopped
  1. Run kamal app exec bash -i (or any other exec command for that matter)
  2. Get the following error:
kamal app exec bash -i
Get most recent version available as an image...
Launching interactive command with version latest via SSH from new container on 192.168.1.5...
docker: Conflicting options: --restart and --rm.
See 'docker run --help'.

Kamal runs the command using docker run --rm while also including all the options from deploy.yml, which works unless one of your options is the one mentioned above.

I'm not saying this is a bug in Kamal, but I would like to hear if anyone has any ideas about fixing or getting around this issue :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions