Skip to content

Commit 5faebe3

Browse files
Flatten .docker Dockerfile structure and modernize Compose config (#103)
* Initial plan * Move .docker nested Dockerfiles to flat structure Co-authored-by: antonkomarev <1849174+antonkomarev@users.noreply.github.com> * Rename docker-compose.yaml to compose.yml and drop version field Co-authored-by: antonkomarev <1849174+antonkomarev@users.noreply.github.com> * Add php85 container to compose.yml and .docker/php85.Dockerfile Co-authored-by: antonkomarev <1849174+antonkomarev@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: antonkomarev <1849174+antonkomarev@users.noreply.github.com>
1 parent f116b9b commit 5faebe3

6 files changed

Lines changed: 37 additions & 5 deletions

File tree

.docker/php85.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ----------------------
2+
# The FPM base container
3+
# ----------------------
4+
FROM php:8.5-cli-alpine AS dev
5+
6+
RUN apk add --no-cache --virtual .build-deps \
7+
$PHPIZE_DEPS
8+
9+
# Cleanup apk cache and temp files
10+
RUN rm -rf /var/cache/apk/* /tmp/*
11+
12+
# ----------------------
13+
# Composer install step
14+
# ----------------------
15+
16+
# Get latest Composer
17+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
18+
19+
# ----------------------
20+
# The FPM production container
21+
# ----------------------
22+
FROM dev
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
version: "3.9"
21
services:
32
php81:
43
container_name: laravel-ban-lib-81
54
image: laravel-ban-lib-81
65
build:
76
context: ./
8-
dockerfile: ./.docker/php/php81/Dockerfile
7+
dockerfile: ./.docker/php81.Dockerfile
98
tty: true
109
working_dir: /app
1110
volumes:
@@ -16,7 +15,7 @@ services:
1615
image: laravel-ban-lib-82
1716
build:
1817
context: ./
19-
dockerfile: ./.docker/php/php82/Dockerfile
18+
dockerfile: ./.docker/php82.Dockerfile
2019
tty: true
2120
working_dir: /app
2221
volumes:
@@ -27,7 +26,7 @@ services:
2726
image: laravel-ban-lib-83
2827
build:
2928
context: ./
30-
dockerfile: ./.docker/php/php83/Dockerfile
29+
dockerfile: ./.docker/php83.Dockerfile
3130
tty: true
3231
working_dir: /app
3332
volumes:
@@ -38,7 +37,18 @@ services:
3837
image: laravel-ban-lib-84
3938
build:
4039
context: ./
41-
dockerfile: ./.docker/php/php84/Dockerfile
40+
dockerfile: ./.docker/php84.Dockerfile
41+
tty: true
42+
working_dir: /app
43+
volumes:
44+
- ./:/app
45+
46+
php85:
47+
container_name: laravel-ban-lib-85
48+
image: laravel-ban-lib-85
49+
build:
50+
context: ./
51+
dockerfile: ./.docker/php85.Dockerfile
4252
tty: true
4353
working_dir: /app
4454
volumes:

0 commit comments

Comments
 (0)