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

Add support for --init to docker driver. #11331

Merged
merged 2 commits into from
Oct 20, 2021
Merged

Conversation

shishir-a412ed
Copy link
Contributor

Fixes #2719

Signed-off-by: Shishir Mahajan [email protected]

@shishir-a412ed
Copy link
Contributor Author

shishir-a412ed commented Oct 15, 2021

Some local testing in the vagrant VM:

  1. Make sure docker-init is present on the system.
# ls /usr/bin/docker-init -lt
-rwxr-xr-x 1 root root 804776 Oct  4 16:06 /usr/bin/docker-init
  1. Without --init
job "count" {
  datacenters = ["dc1"]

  group "count-group" {
    count = 1
    task "count-task" {
      driver = "docker"
      config {
        image = "count:1.0"
      }

      resources {
        cpu    = 500
        memory = 256
      }
    }
  }
}

$ ./nomad job run test.nomad

# docker inspect -f {{.HostConfig.Init}} <container_id>
<nil>
  1. With --init
job "count" {
  datacenters = ["dc1"]

  group "count-group" {
    count = 1
    task "count-task" {
      driver = "docker"
      config {
        image = "count:1.0"
        init      = true
      }

      resources {
        cpu    = 500
        memory = 256
      }
    }
  }
}

$ ./nomad job run test.nomad

# docker inspect -f {{.HostConfig.Init}} <containerd_id>
true

Website changes tested locally:

tini

@schmichael schmichael self-requested a review October 18, 2021 23:05
Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shishir-a412ed !

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing --init to docker run
2 participants