Skip to content

Commit 29f3cb5

Browse files
authored
Optimize docker dev env (#107)
1 parent 0fb8d8c commit 29f3cb5

File tree

8 files changed

+21
-116
lines changed

8 files changed

+21
-116
lines changed

.docker/php.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ARG PHP_VERSION
2+
3+
FROM php:${PHP_VERSION}-cli-alpine
4+
5+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

.docker/php81.Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

.docker/php82.Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

.docker/php83.Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

.docker/php84.Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

.docker/php85.Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
/.styleci.yml export-ignore
99
/CODE_OF_CONDUCT.md export-ignore
1010
/CONTRIBUTING.md export-ignore
11-
/ompose.yml export-ignore
11+
/compose.yml export-ignore
1212
/phpunit.xml.dist export-ignore

compose.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ services:
44
image: laravel-ban-lib-81
55
build:
66
context: ./
7-
dockerfile: ./.docker/php81.Dockerfile
7+
dockerfile: ./.docker/php.Dockerfile
8+
args:
9+
PHP_VERSION: "8.1"
810
tty: true
911
working_dir: /app
1012
volumes:
@@ -15,7 +17,9 @@ services:
1517
image: laravel-ban-lib-82
1618
build:
1719
context: ./
18-
dockerfile: ./.docker/php82.Dockerfile
20+
dockerfile: ./.docker/php.Dockerfile
21+
args:
22+
PHP_VERSION: "8.2"
1923
tty: true
2024
working_dir: /app
2125
volumes:
@@ -26,7 +30,9 @@ services:
2630
image: laravel-ban-lib-83
2731
build:
2832
context: ./
29-
dockerfile: ./.docker/php83.Dockerfile
33+
dockerfile: ./.docker/php.Dockerfile
34+
args:
35+
PHP_VERSION: "8.3"
3036
tty: true
3137
working_dir: /app
3238
volumes:
@@ -37,7 +43,9 @@ services:
3743
image: laravel-ban-lib-84
3844
build:
3945
context: ./
40-
dockerfile: ./.docker/php84.Dockerfile
46+
dockerfile: ./.docker/php.Dockerfile
47+
args:
48+
PHP_VERSION: "8.4"
4149
tty: true
4250
working_dir: /app
4351
volumes:
@@ -48,7 +56,9 @@ services:
4856
image: laravel-ban-lib-85
4957
build:
5058
context: ./
51-
dockerfile: ./.docker/php85.Dockerfile
59+
dockerfile: ./.docker/php.Dockerfile
60+
args:
61+
PHP_VERSION: "8.5"
5262
tty: true
5363
working_dir: /app
5464
volumes:

0 commit comments

Comments
 (0)