Skip to content

Create mounted volumes before running docker

Compare
Choose a tag to compare
@spellr spellr released this 16 Jun 13:19
· 21 commits to master since this release

If we mount to a directory the doesn't exist, docker will create the local directory.

If we let docker create the directories, it will create it owned by root-user, and then the container won't be able to write to the directory.
By creating them in-advance, we make them owned by the user, and the container can write to them.
BTW - This solves the problem with 'go build' not being able to write to the 'gocache' directory.