File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 31
31
],
32
32
33
33
// Use 'postCreateCommand' to run commands after the container is created.
34
- "postCreateCommand" : " sudo chmod a+x \" $(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \" $(pwd)\" /var/www/html; test -f composer.json && composer install"
34
+ "postCreateCommand" : " sudo .devcontainer/post-create.sh && sudo chmod a+x \" $(pwd)\" && sudo ln -s \" $(pwd)\" /var/www/html" ,
35
+ "waitFor" : " postCreateCommand" ,
36
+ "postAttachCommand" : {
37
+ "Server" : " apache2ctl start"
38
+ }
35
39
36
40
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
37
41
// "remoteUser": "root"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ test -f composer.json && composer install
4
+
5
+ sed -i ' s/Listen 80$//' /etc/apache2/ports.conf \
6
+ && sed -i ' s/<VirtualHost \*:80>/ServerName 127.0.0.1\n<VirtualHost \*:8080>/' /etc/apache2/sites-enabled/000-default.conf \
7
+ && rm -rf /var/www/html
You can’t perform that action at this time.
0 commit comments