Skip to content

Instantly share code, notes, and snippets.

@nicolas-oliveira
Last active August 23, 2022 15:22
Show Gist options
  • Save nicolas-oliveira/4cfbb75de109d78756ae9f6b69ec4d3d to your computer and use it in GitHub Desktop.
Save nicolas-oliveira/4cfbb75de109d78756ae9f6b69ec4d3d to your computer and use it in GitHub Desktop.
Automatização no WSL que executa o daemon do docker toda vez que inicializa a primeira vez
# Verifica se o docker esta ativo caso contrario ele executa
echo "Verifying if docker daemon is running..."
docker_active=$(service docker status | grep failed)
if [ -z "$docker_active" ]
then
echo "Docker is active now"
else
echo "Docker is not running, starting the process"
sudo service docker start
fi
# User privilege specification
root ALL=(ALL:ALL) ALL
nicolas ALL=(ALL:ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
%nicolas ALL=(ALL:ALL) ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment