I am attempting to convert a Docker Compose file to a Nomad job file for a service written in Go. I’m receiving an unusual error at runtime that seems to be related to the way the filesystem works in Nomad, but not 100% sure. Here is the docker compose (only relevant sections for brevity):
memphis-cluster:
image: "memphisos/memphis-broker-master:latest"
healthcheck:
test: wget http://127.0.0.1:9000 --spider || exit 1
interval: 10s
retries: 30
start_period: 5s
restart: on-failure
pull_policy: always
networks:
- memphis
ports:
- "9000:9000"
- "6666:6666"
- "7770:7770"
- "8222:8222"
environment:
- ROOT_PASSWORD=memphis
- CONNECTION_TOKEN=memphis
- DOCKER_ENV=true
- ANALYTICS=true
- LOGS_RETENTION_IN_DAYS=3
- JWT_SECRET=JWT_TEST_PURPOSE
- REFRESH_JWT_SECRET=REFRESH_JWT_TEST_PURPOSE
command: >
-js --auth=memphis --websocket_no_tls=true -m 8222
And the corresponding Nomad Job (pulling the Docker image from a local repo)
task "broker" {
driver = "docker"
config {
image = "10.198.8.230:8082/docker-local/memphis-broker"
force_pull = true
auth {
server_address = "http://10.198.8.230:8082/"
username = "admin"
password = "***"
}
ports = ["memphis-dashboard", "memphis-client", "memphis-websocket", "memphis-metrics"]
args = [
"-js",
"--auth=memphis",
"--websocket_no_tls=true",
"-m",
"8222"
]
}
env {
ROOT_PASSWORD = "memphis"
CONNECTION_TOKEN = "memphis"
DOCKER_ENV = "true"
ANALYTICS = "true"
LOGS_RETENTION_IN_DAYS = "3"
JWT_SECRET = "JWT_TEST_PURPOSE"
REFRESH_JWT_SECRET = "REFRESH_JWT_TEST_PURPOSE"
}
resources {
cpu = 400
memory = 600
}
}
The docker container starts up, but errors out with the following error:
failed to set GOMAXPROCS: path "/nomad/shared" is not a descendant of mount point root "/docker/60d97a31b621c8d8e7645f9d1bc6f74412b19ee30d10da5c093fa99530914c64" and cannot be exposed from "/sys/fs/cgroup/cpuset"
Any help in pointing in the right direction is very appreciated. Thanks