-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implemented Port Labeling and Driver Configurations #415
Conversation
@@ -134,8 +157,7 @@ func (d *DockerDriver) createContainer(ctx *ExecContext, task *structs.Task) (do | |||
env.SetTaskLocalDir(filepath.Join("/", allocdir.TaskLocal)) | |||
|
|||
config := &docker.Config{ | |||
Env: env.List(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this got moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are setting the port map later, so moved it down.
This is a huge improvement. 👍 |
@@ -23,6 +24,34 @@ type DockerDriver struct { | |||
fingerprint.StaticFingerprinter | |||
} | |||
|
|||
type DockerDriverConfig struct { | |||
ImageName string `mapstructure:"image"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put comments on what the fields do, here and for all the drivers
e7096d8
to
bc2efb7
Compare
PortMap []map[string]int `mapstructure:"port_map"` // A map of host port labels and the ports exposed on the container | ||
Privileged bool `mapstructure:"privileged"` // Flag to run the container in priviledged mode | ||
DNS string `mapstructure:"dns_server"` // DNS Server for containers | ||
SearchDomains string `mapstructure:"search_domains"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed one? :)
You also need to update the website docs for the drivers and the example json in the http api pages. |
LGTM. Follow up PR with docs. |
Implemented Port Labeling and Driver Configurations
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. |
Opening this PR so that the team can check out how this is shaping up. This is not tested, and tests haven't been fixed or added yet.