Skip to content

Instantly share code, notes, and snippets.

@Pleskan
Last active March 19, 2024 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pleskan/6f3ba94cec3ee986ba460dd778e66148 to your computer and use it in GitHub Desktop.
Save Pleskan/6f3ba94cec3ee986ba460dd778e66148 to your computer and use it in GitHub Desktop.
Docker prepare user for work
#!/bin/bash
expect_commands='
spawn dpkg-reconfigure dash -freadline
expect "Use dash as the default system shell?"
send "N\r"'
apt install build-essential expect keychain
mkdir -pv /var/www
expect -c "${expect_commands///;}"
usermod -aG docker www-data
mkdir -v /var/www/.ssh && chmod -v 0700 $_
mkdir -v /var/www/html && chown -Rv www-data:www-data /var/www/
usermod -s /bin/bash www-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment