Created
May 1, 2016 09:52
-
-
Save ScreamingDev/fdcf9b4dd6ca726bb4725f866dd1ce3e to your computer and use it in GitHub Desktop.
Docker chown inside container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
adduser --system --uid=$(stat -c "%u" /var/www) "host" | |
echo "APACHE_RUN_USER=host" >> /etc/apache2/envvars | |
SERVER_NAME=${SERVER_NAME:=localhost} | |
echo "ServerName $SERVER_NAME" > /etc/apache2/conf.d/server-name | |
/etc/init.d/apache2 start | |
bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment