An yarn
cache compatible Dockerfile, for building node.js images faster.
Clone this gist into your project root, and add it to your source control.
Change the image service-name:latest
tag to your project name in the Dockerfile
and build.sh
files.
Then, always build your image using the build.sh
script.
$ chmod +x ./build.sh
$ ./build.sh
If you are also wondering why your container doesn't work after building on OSX, its because yarn has issues symlinking on OSX/BSD