bc42cd2e5e
Pulling large docker containers can take longer than the default context timeout. Without a way to change this it is very hard for users to utilise Nomad properly without hacky work arounds. This change adds an optional pull_timeout config parameter which gives operators the possibility to account for increase pull times where needed. The infra docker image also has the option to set a custom timeout to keep consistency.
27 lines
609 B
Go
27 lines
609 B
Go
// +build windows
|
|
|
|
package docker
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/nomad/client/allocdir"
|
|
)
|
|
|
|
func newTaskConfig(variant string, command []string) TaskConfig {
|
|
// busyboxImageID is an id of an image containing nanoserver windows and
|
|
// a busybox exe.
|
|
busyboxImageID := "hashicorpnomad/busybox-windows:server2016-0.1"
|
|
|
|
return TaskConfig{
|
|
Image: busyboxImageID,
|
|
ImagePullTimeout: "5m",
|
|
Command: command[0],
|
|
Args: command[1:],
|
|
}
|
|
}
|
|
|
|
// No-op on windows because we don't load images.
|
|
func copyImage(t *testing.T, taskDir *allocdir.TaskDir, image string) {
|
|
}
|