File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
- ARG PHP_VERSION=8.0
2
- ARG COMPOSER_VERSION=2.0
1
+ ARG PHP_VERSION=8.1
2
+ ARG COMPOSER_VERSION=2.5.4
3
3
4
4
FROM composer:${COMPOSER_VERSION}
5
5
FROM php:${PHP_VERSION}-cli
@@ -13,3 +13,9 @@ RUN apt-get update && \
13
13
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
14
14
15
15
WORKDIR /code
16
+
17
+ COPY . .
18
+
19
+ RUN composer install
20
+
21
+ CMD ["./vendor/bin/phpunit" ]
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ version: '3'
3
3
services :
4
4
tests :
5
5
container_name : tests
6
+ # platform: linux/arm64
7
+ tty : true
6
8
build :
7
9
context : .
8
10
dockerfile : Dockerfile
@@ -15,9 +17,10 @@ services:
15
17
16
18
mysql :
17
19
container_name : mysql
18
- image : mysql:5.7
20
+ # platform: linux/arm64
21
+ image : mysql:8.0
19
22
ports :
20
- - 3306:3306
23
+ - " 3306:3306"
21
24
environment :
22
25
MYSQL_ROOT_PASSWORD :
23
26
MYSQL_DATABASE : unittest
@@ -27,8 +30,7 @@ services:
27
30
28
31
mongodb :
29
32
container_name : mongodb
30
- image : mongo
33
+ # platform: linux/arm64
34
+ image : mongo:latest
31
35
ports :
32
- - 27017:27017
33
- logging :
34
- driver : none
36
+ - " 27017:27017"
Original file line number Diff line number Diff line change 38
38
</testsuite >
39
39
</testsuites >
40
40
<php >
41
- <env name =" MONGODB_URI" value =" mongodb://127.0.0.1 /" />
41
+ <env name =" MONGODB_URI" value =" mongodb://mongodb /" />
42
42
<env name =" MONGODB_DATABASE" value =" unittest" />
43
43
<env name =" MYSQL_HOST" value =" mysql" />
44
44
<env name =" MYSQL_PORT" value =" 3306" />
You can’t perform that action at this time.
0 commit comments