I'm using sbt-native-packager to build Dockers for my Scala project. I'd like to deploy on a repository running in my AWS account. How can I set up sbt-native-packager to do this?
On AWS I installed docker on an instance then installed and ran the samalba registry with defaults like this: docker run -d -p 5000:5000 registry. Seemed to come up fine.
I see sbt-native-packager has a 'dockerRepository' directive, which I've set to this: Some("my_ec2_host:5000")
I saw some docs about putting my ca.crt into /etc/docker/certs.d/my_ec2_host:5000/ca.cert
So I copied my AWS pem file into ca.cert at that location (is that right?) on my local machine (not AWS) and restarted docker.
When I ran sbt docker:publish I get this:
[info] Built image ec2-52-11-223-79.us-west-2.compute.amazonaws.com:5000/root:latest
[error] 2015/04/17 10:17:32 Error: Invalid registry endpoint http://ift.tt/1cCVeDf: Get http://ift.tt/1FSdcsq: dial tcp 52.11.223.79:5000: i/o timeout. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry ec2-52-11-223-79.us-west-2.compute.amazonaws.com:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/ec2-52-11-223-79.us-west-2.compute.amazonaws.com:5000/ca.crt
[trace] Stack trace suppressed: run last docker:publish for the full output.
[error] (docker:publish) Nonzero exit value: 1
[error] Total time: 7 s, completed Apr 17, 2015 3:17:32 PM
What am I missing?
Aucun commentaire:
Enregistrer un commentaire