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

feat: add runtime, stop_signal and stop_timeout properties to the docker_container resource #364

Merged
merged 6 commits into from
Jul 11, 2022

Conversation

sestegra
Copy link
Contributor

Add the optional properties runtime, stop_signal and stop_timeout to the docker_container resource.

  • runtime (String) Runtime to use for the container.
  • stop_signal (String) Signal to stop a container (default SIGTERM).
  • stop_timeout (Number) Timeout (in seconds) to stop a container

Example using Sysbox

resource "docker_image" "sysbox" {
  name = "registry.nestybox.com/nestybox/ubuntu-focal-systemd-docker:latest"
}

resource "docker_container" "sysbox" {
  image   = docker_image.sysbox.repo_digest
  name    = "sysbox"

  runtime      = "sysbox-runc"
  stop_signal  = "SIGRTMIN+3"
  stop_timeout = 60

  publish_all_ports = true
}

Signed-off-by: Stéphane Este-Gracias <[email protected]>
Signed-off-by: Stéphane Este-Gracias <[email protected]>
Signed-off-by: Stéphane Este-Gracias <[email protected]>
@mavogel mavogel added the r/container Relates to the container resource label Jun 9, 2022
@ntimo
Copy link

ntimo commented Jun 20, 2022

Is this going to get merged any time soon?

@Junkern Junkern added this to the v2.18.0 milestone Jul 11, 2022
@Junkern Junkern merged commit 6fd5b02 into kreuzwerker:master Jul 11, 2022
@Junkern
Copy link
Contributor

Junkern commented Jul 11, 2022

Thanks for your contribution, we will release a new version today/tomorrow :)

@sestegra
Copy link
Contributor Author

Great, thank you for merging this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r/container Relates to the container resource
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants