diff --git a/README.md b/README.md index 113a3d39..46de37b9 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,8 @@ There is no need to use `docker login` or `docker logout`. ## Troubleshooting -Logs from the Amazon ECR Docker Credential Helper are stored in `~/.ecr/log`. +Logs from the Amazon ECR Docker Credential Helper are stored inside you cache +files directory (e.g.: `~/.cache/ecr/log` on *nix). For more information about Amazon ECR, see the the [Amazon Elastic Container Registry User Guide](http://docs.aws.amazon.com/AmazonECR/latest/userguide/what-is-ecr.html). diff --git a/ecr-login/config/cache_dir.go b/ecr-login/config/cache_dir.go index d7c2ee64..82eb5d84 100644 --- a/ecr-login/config/cache_dir.go +++ b/ecr-login/config/cache_dir.go @@ -19,5 +19,7 @@ func GetCacheDir() string { if cacheDir := os.Getenv("AWS_ECR_CACHE_DIR"); cacheDir != "" { return cacheDir } - return "~/.ecr" + dir, _ := os.UserCacheDir() + + return dir + "/ecr" }