Fork me on GitHub
#docker2016-03-16
>
bplatz14:03:40

Getting a container ID from inside a container proves difficult. The file /proc/self/cgroups contains it, but is a symbolic link constantly changing, and io/file has not proven to work for me. This works:

bplatz14:03:44

You can also set a --cid-file option when using docker run, making things easier, however to my knowledge this option is not available with docker-compose