This was working fine until docker-snap was updated to 19.03 which upgraded the python version to 3.5. To fix the breakage I had to update PYTHONPATH to $SNAP/docker-exe/lib/python3.5/site-packages.
What is the recommended way of using content interface to avoid such breakages in future?
Snaps providing content via the content interface need to version the names of the interfaces, if I understand correctly. The only way to completely avoid the problem is to bundle them.
@tianon, this is something you probably want to think about, other snaps use the docker content interface to call docker-compose which is Python based and thus could be broken by changes to the version of python in the snap, etc. Perhaps instead of putting the docker-compose file in that dir, you could put a little wrapper script which sets the proper env variables so that users of the content interface don’t need to mind this themselves? i.e. move the bin/docker-compose binary to bin/docker-compose-real and then bin/docker-compose becomes:
For changing the snap to use python3 or changing the base of the snap to 18.04 you could change the slot to docker-executables-16.04-python3 or docker-executables-18.04-python2 respectively. However then other snap applications like this user would be broken again if you switched the slot names so I would recommend just replacing the docker-compose binary as described above.