Exemple #1
0
func startBus() {
	name := busName()
	ports := []string{"2181/tcp", "9092/tcp"}

	ensureNoError(
		containers.Start(dockerClient, name, ports),
		"Unable to start bus cluster",
	)
}
Exemple #2
0
func startApp() {
	name := serviceName() + "_1"
	image := serviceName()
	ports := []string{"8080/tcp"}

	ensureNoError(
		containers.Create(dockerClient, image, name, image, ports, []string{}, []string{"nanoservice_bus_1:bus"}),
		"Unable to create container from "+image+" with name "+name,
	)

	ensureNoError(
		containers.Start(dockerClient, name, ports),
		"Unable to start container "+name,
	)
}