Skip to content

lmsmartins/docker-alias

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 

Repository files navigation

Docker alias and functions

  1. Go to your home directory: cd ~/
  2. Add to .zshrc or to .bash_profile (MacOS) or to ~/.bashrc (Ubuntu)

Docker Toolbox

Get IP from docker machine

docker-machine ip

Docker login error

Error: error getting credentials - err: exec: "docker-credential-osxkeychain": executable file not found in $PATH, out:

Solution:

  1. brew install docker-credential-helper
  2. docker login -> should work now

Speed up Docker in MacOS

  1. Install docker machine NFS: brew install docker-machine-nfs (https://github.com/adlogix/docker-machine-nfs)

  2. Restart your computer

  3. Mount in your docker VM (e.g. default): docker-machine-nfs default --mount-opts="nolock,vers=3,tcp,fsc,rw,noatime"

If you receive the "Cannot detected the NFS mount :(" error, then do the following:

"default" is the docker machine name.

  1. docker-machine regenerate-certs default
  2. docker-machine-nfs default
  3. docker-machine-nfs default --mount-opts="nolock,vers=3,tcp,fsc,rw,noatime"

Test Docker speed (you should expect < 1 sec results)

docker run -it -v /Users/youruser/test:/var/www alpine time dd if=/dev/zero of=/var/www/test.dat bs=1024 count=100000

Reference

About

My Docker alias and functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%