I have a task where I would like to pull a Hazelcast docker image (built with packer) from Amazon S3 and run start it up:
task "hazelcast" {
# Use Docker to run the task.
driver = "docker"
# Configure Docker driver with the image
config {
load = ["hazelcast.tar"]
image = "hazelcast/hazelcast:latest"
command = "/opt/hazelcast/server.sh"
port_map {
hazelcast = 5701
}
}
env {
JAVA_OPTS="-Xms1G -Xmx1G -Dhazelcast.initial.wait.seconds=100"
}
# We must specify the resources required for
# this task to ensure it runs on a machine with
# enough capacity.
resources {
cpu = 500 # 500 Mhz
memory = 2048 # 2GB
network {
mbits =2
port "hazelcast" {}
}
}
artifact {
}
I have imported the tarball into my local docker and everything looks fine (the image is loaded, has the tag "hazelcast/hazelcast:latest" and I can "docker exec -it .... /bin/bash" to access it as expected).
When I run the job containing this task, I get this alloc-status:
ID = f2e4b0d1
Eval ID = a4ea234c
Name = hazelcast.server[1]
Node ID = f12ffa15
Job ID = hazelcast
Client Status = failed
==> Task Resources
Task: "hazelcast"
CPU Memory MB Disk MB IOPS Addresses
==> Task "hazelcast" is "dead"
Recent Events:
Time Type Description
19/05/16 20:37:37 UTC Restarts Exceeded <none>
19/05/16 20:37:37 UTC Driver Failure Failed to pull `hazelcast/hazelcast:latest`: Error: image hazelcast/hazelcast:latest not found
19/05/16 20:37:28 UTC Downloading Artifacts Client is downloading artifacts
19/05/16 20:37:28 UTC Received Task received by client
I tried using the Docker Image ID for the "image" configuration item but it still didn't work.
Any ideas?