Allow Docker Apache write permissions

I had a permission problem using PHP scripts, 
Running ` chown -R www-data /var/www/html ` after SSHing into the docker container helped fixing the problem.
This commit is contained in:
Yuri Habib
2022-02-13 14:58:13 -08:00
committed by GitHub
parent 70d3448110
commit a724b0daee

View File

@@ -11,6 +11,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push(`COPY ./${baseDirectory || ''} /var/www/html`);
Dockerfile.push(`EXPOSE 80`);
Dockerfile.push('CMD ["apache2-foreground"]');
Dockerfile.push('RUN chown -R www-data /var/www/html');
await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile.join('\n'));
};