File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ services:
11
11
dockerfile : docker/Dockerfile
12
12
args :
13
13
DOCKER_UID : ${DOCKER_UID}
14
+ ports :
15
+ - 80:80
14
16
volumes :
15
17
- ${INSTALLATION_PATH}:/var/www/phpbenchmarks
16
18
- ../src:/var/phpbenchmarks
Original file line number Diff line number Diff line change @@ -82,6 +82,16 @@ function startDockerContainer {
82
82
echoActionDone
83
83
}
84
84
85
+ function addHost() {
86
+ local host=$1
87
+ if [ " $( cat /etc/hosts | grep $host ) " == " " ]; then
88
+ echoAction " Add $host host in /etc/hosts"
89
+ sudo bash -c " echo '127.0.0.1 $host ' >> /etc/hosts"
90
+ [ " $? " != " 0" ] && exitScript " Error while adding host $host ."
91
+ echoActionDone
92
+ fi
93
+ }
94
+
85
95
trap onExit EXIT
86
96
87
97
currentAction=
@@ -91,6 +101,12 @@ defineInstallationPath
91
101
92
102
createPhpbenchmarksDirectory
93
103
104
+ addHost " php56.benchmark.loc"
105
+ addHost " php70.benchmark.loc"
106
+ addHost " php71.benchmark.loc"
107
+ addHost " php72.benchmark.loc"
108
+ addHost " php73.benchmark.loc"
109
+
94
110
cd docker
95
111
buildDockerImage
96
112
startDockerContainer
You can’t perform that action at this time.
0 commit comments