Skip to content

Instantly share code, notes, and snippets.

@dreamyguy
Last active August 4, 2017 10:48
Show Gist options
  • Save dreamyguy/d72c0a27f824b1b55025959e8b5334a5 to your computer and use it in GitHub Desktop.
Save dreamyguy/d72c0a27f824b1b55025959e8b5334a5 to your computer and use it in GitHub Desktop.
Ultimate "Docker on macOS" problems solver

For when Docker acts up on you (macOS):

  1. Restart docker
  2. docker system prune (the secret sauce)
  3. docker login -u _token -p "$(gcloud auth print-access-token)" https://eu.gcr.io (authenticate if needed)
  4. docker-compose build --no-cache

If experiencing problems with npm modules or bower components:

  1. rm -rf <path>/node_modules && rm -rf <path>/bower_components/ && docker-compose build --no-cache

<path> stands for application's root path

If you know the name of the image you need to pull:

  1. rm -rf <path>/node_modules && rm -rf <path>/bower_components/ && docker-compose build --no-cache --pull <image>

<image> stands for the image that needs to be pulled. --pull <image> is not necessary in most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment