I am trying to run Concourse from the 3.5.0 docker image and using the docker-compose.yml example as a template. I created a bridged docker network for the connections then started the postgres docker container created keys in directories web and worker. The web one contains;
authorised_worker_keys (which is the public key worker_key.pub)
session_signing_key
session_signing_key.pub
tsa_host_key
tsa_host_key.pub
The worker one contains;
tsa_host_key.pub worker_key worker_key.pub
Then started a web instance in the same docker network with;
docker run -d -p 8080:8080 \
-e "CONCOURSE_EXTERNAL_URL=http://XXX.XXX.XXX.XXX:8080" \
-e "CONCOURSE_BASIC_AUTH_USERNAME=concourse" \
-e "CONCOURSE_BASIC_AUTH_PASSWORD=changeme" \
-e "CONCOURSE_POSTGRES_HOST=concourse-db" \
-e "CONCOURSE_POSTGRES_USER=concourse" \
-e "CONCOURSE_POSTGRES_PASSWORD=changeme" \
-e "CONCOURSE_POSTGRES_DATABASE=concourse" \
--name=concourse-web \
--net=concourse_network \
-v web:/concourse-keys \
concourse/concourse web
This web container fails and logs
failed to load authorised keys: open : no such file or directory
If I exec a shell in the postgres container and login using psql I can see that the database has had some tables added for concourse so that connection must have worked.
A worker container starts and stays running when I start it with;
docker run -d \
--name=concourse-worker-1 \
--privileged \
--net=concourse_network \
-v worker:/concourse-keys
-e "CONCOURSE_TSA_HOST=concourse-web" \
concourse/concourse worker
Has anyone any ideas what is causing the "failed to load authorized keys" message and how I can beat it please? If I run it from docker compose on my laptop is works perfectly but I can't run docker compose in our environment.
I have spotted the issue and corrected it this morning so I'll post it here for others to learn from my stupidity. BTW I worked it out my comparing docker inspect outputs from the containers started from the docker-compose file and mine in the other environment.
The mounts needed a full path not a relative path i.e.
-v /home/concourse/keys/web:/concourse-keys
and
-v /home/concourse/keys/worker:/concourse-keys
Thanks for reading.