travis-docker-example
travis-docker-example copied to clipboard
Doesn't work anymore
It looks like this doesn't run anymore, because Docker needs to access a key in /etc/docker/key.json
. Running the "script:" line with sudo fixed this for me.
Docker might have an option to store its files elsewhere, but I do not know it.
I'm not using docker much anymore so I don't understand the issue. I'll happily merge a pull request if you have a fix in mind. Thanks!
This is the result of building your repository right now
I'm assuming this comes from changes in Docker since your last build
The daemon dies with:
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
FATA[0000] Shutting down daemon due to errors: Error loading key file /etc/docker/key.json: unable to read key file /etc/docker/key.json: open /etc/docker/key.json: permission denied
FATA[0000] Post http:///var/run/docker.sock/v1.18/containers/create: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
[ 6.590000] System halted.
Running UML as root fixes it (see this build). However I don't think this is the correct fix...
You're right. This repo was just rebuilt and failed with that error.
I encountered the same issue on my repo: https://github.com/moul/travis-docker/
I had to configure permissions like this: https://github.com/moul/travis-docker/commit/e05feec301dae9cfb169fa70ac11a17ba11a5cda#diff-3fbb47e318cd8802bd325e7da9aaabe8R19 (line 19)
Is there a reason not to run UML as root?
If anyone cares, I'm getting this problem too
$ docker run hello-world
FATA[0000] Post http:///var/run/docker.sock/v1.18/containers/create: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
I wasn't trying to do anything special. Just install docker and see that it works.
Thanks @moul !
@felzix since @moul's version is working fine, I'd suggest switching to his up-to-date repository :)