Skip to content

Instantly share code, notes, and snippets.

@JonathonReinhart
Last active February 19, 2016 18:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathonReinhart/96d34f9b5a28f3bd7821 to your computer and use it in GitHub Desktop.
Save JonathonReinhart/96d34f9b5a28f3bd7821 to your computer and use it in GitHub Desktop.
Prevent docker client from saving credentials to disk
#!/bin/sh
# This prevents docker config from persisting to disk.
# Place this file in /etc/profile.d/ to happen automatically at login for all users.
# JRR 2015-12-17
# See:
# https://github.com/docker/docker/issues/10318
# https://github.com/docker/docker/issues/18708
dockercfgdir="/dev/shm/dockercfg-$(id -un)"
mkdir -p $dockercfgdir
chmod 700 $dockercfgdir
rm -rf ~/.docker
ln -s $dockercfgdir ~/.docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment