Skip to content

Commit 670abce

Browse files
committed
8.2-node updates
1 parent 84341da commit 670abce

File tree

11 files changed

+63
-223
lines changed

11 files changed

+63
-223
lines changed

.github/workflows/ci-cd.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ jobs:
6666
load: true
6767
tags: kooldev/php:${{ matrix.version }}-nginx${{ matrix.type }}
6868

69+
- name: Build and export to Docker (Node)
70+
uses: docker/build-push-action@v5
71+
if: ${{ matrix.type }} == ''
72+
with:
73+
context: ${{ matrix.version }}-node${{ matrix.type }}
74+
load: true
75+
tags: kooldev/php:${{ matrix.version }}-node${{ matrix.type }}
76+
6977
- name: Tests (nginx)
7078
run: |
7179
docker run kooldev/php:${{ matrix.version }}-nginx${{ matrix.type }} php -v

8.0-node/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM kooldev/php:8.0
2+
3+
RUN apk add --update --no-cache npm yarn \
4+
&& rm -rf /var/cache/apk/* /tmp/*

8.1-node/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM kooldev/php:8.1
2+
3+
RUN apk add --update --no-cache npm yarn \
4+
&& rm -rf /var/cache/apk/* /tmp/*

8.2-node/Dockerfile

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,4 @@
1-
FROM php:8.2-fpm-alpine
1+
FROM kooldev/php:8.2
22

3-
ENV ASUSER= \
4-
UID= \
5-
COMPOSER_ALLOW_SUPERUSER=1 \
6-
COMPOSER_MEMORY_LIMIT=-1 \
7-
ENABLE_XDEBUG=false \
8-
PHP_DATE_TIMEZONE=UTC \
9-
PHP_MEMORY_LIMIT=256M \
10-
PHP_MAX_INPUT_VARS=1000 \
11-
PHP_UPLOAD_MAX_FILESIZE=25M \
12-
PHP_POST_MAX_SIZE=25M \
13-
PHP_MAX_EXECUTION_TIME=30 \
14-
PHP_FPM_LISTEN=9000 \
15-
PHP_FPM_MAX_CHILDREN=10 \
16-
PHP_FPM_REQUEST_TERMINATE_TIMEOUT=60 \
17-
ENTRYPOINT=entrypoint.php.sh
18-
19-
WORKDIR /app
20-
21-
RUN adduser -D -u 1337 kool \
22-
&& addgroup kool www-data \
23-
# dockerize
24-
&& curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-alpine-linux-amd64-v0.6.1.tar.gz | tar xz \
25-
&& mv dockerize /usr/local/bin/dockerize \
26-
# deps
27-
&& apk --no-cache add su-exec bash sed git openssh-client icu shadow procps \
28-
freetype libpng libjpeg-turbo libzip-dev ghostscript imagemagick \
29-
jpegoptim optipng pngquant gifsicle libldap \
30-
libpq less \
31-
# build-deps
32-
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
33-
freetype-dev libpng-dev libjpeg-turbo-dev \
34-
icu-dev libedit-dev libxml2-dev \
35-
imagemagick-dev openldap-dev oniguruma-dev \
36-
postgresql-dev \
37-
linux-headers \
38-
# php-ext
39-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
40-
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
41-
&& docker-php-ext-install -j$(nproc) \
42-
bcmath \
43-
calendar \
44-
exif \
45-
gd \
46-
intl \
47-
ldap \
48-
mbstring \
49-
pcntl \
50-
pdo \
51-
pdo_mysql \
52-
pdo_pgsql \
53-
soap \
54-
xml \
55-
zip \
56-
sockets \
57-
mysqli \
58-
&& pecl install imagick redis \
59-
&& pecl install xdebug \
60-
&& pecl install pcov && docker-php-ext-enable pcov \
61-
&& docker-php-ext-enable imagick \
62-
&& docker-php-ext-enable redis \
63-
&& cp "/usr/local/etc/php/php.ini-development" "/usr/local/etc/php/php.ini" \
64-
# composer
65-
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
66-
&& curl -sS https://getcomposer.org/installer | php -- --1 --install-dir=/usr/local/bin --filename=composer1 \
67-
# symlink composer2 for BC
68-
&& ln -s /usr/local/bin/composer /usr/local/bin/composer2 \
69-
# cleanup
70-
&& apk del .build-deps \
3+
RUN apk add --update --no-cache npm yarn \
714
&& rm -rf /var/cache/apk/* /tmp/*
72-
73-
RUN apk add --update --no-cache npm
74-
75-
COPY kool.ini /kool/kool.tmpl
76-
COPY zz-docker.conf /kool/zz-docker.tmpl
77-
COPY entrypoint /kool/entrypoint
78-
RUN chmod +x /kool/entrypoint
79-
80-
EXPOSE 9000
81-
82-
ENTRYPOINT [ "/kool/entrypoint" ]
83-
CMD [ "php-fpm" ]

8.2-node/entrypoint

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

8.2-node/kool.ini

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

8.2-node/zz-docker.conf

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

fwd-template.json

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,19 @@
109109
}
110110
]
111111
},
112+
{
113+
"name": "8.0-node",
114+
"data": {
115+
"from": "kooldev/php:8.0",
116+
"version": "8.0"
117+
},
118+
"files": [
119+
{
120+
"name": "Dockerfile",
121+
"path": "template/Dockerfile-node"
122+
}
123+
]
124+
},
112125
{
113126
"name": "8.1",
114127
"data": {
@@ -218,37 +231,23 @@
218231
]
219232
},
220233
{
221-
"name": "8.2",
234+
"name": "8.1-node",
222235
"data": {
223-
"from": "php:8.2-fpm-alpine",
224-
"prod": false,
225-
"nginx": false,
226-
"version": "8.2"
236+
"from": "kooldev/php:8.1",
237+
"version": "8.1"
227238
},
228239
"files": [
229240
{
230241
"name": "Dockerfile",
231-
"path": "template/Dockerfile"
232-
},
233-
{
234-
"name": "entrypoint",
235-
"path": "template/entrypoint"
236-
},
237-
{
238-
"name": "kool.ini",
239-
"path": "template/kool-ini"
240-
},
241-
{
242-
"name": "zz-docker.conf",
243-
"path": "template/zz-docker-conf"
242+
"path": "template/Dockerfile-node"
244243
}
245244
]
246245
},
247246
{
248-
"name": "8.2-prod",
247+
"name": "8.2",
249248
"data": {
250249
"from": "php:8.2-fpm-alpine",
251-
"prod": true,
250+
"prod": false,
252251
"nginx": false,
253252
"version": "8.2"
254253
},
@@ -272,11 +271,10 @@
272271
]
273272
},
274273
{
275-
"name": "8.2-node",
274+
"name": "8.2-prod",
276275
"data": {
277276
"from": "php:8.2-fpm-alpine",
278-
"with_node": true,
279-
"prod": false,
277+
"prod": true,
280278
"nginx": false,
281279
"version": "8.2"
282280
},
@@ -352,6 +350,19 @@
352350
"path": "template/supervisor-conf"
353351
}
354352
]
353+
},
354+
{
355+
"name": "8.2-node",
356+
"data": {
357+
"from": "kooldev/php:8.2",
358+
"version": "8.2"
359+
},
360+
"files": [
361+
{
362+
"name": "Dockerfile",
363+
"path": "template/Dockerfile-node"
364+
}
365+
]
355366
}
356367
]
357368
}

kool.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ scripts:
55
- docker build --pull -t kooldev/php:8.0-prod 8.0-prod
66
- docker build -t kooldev/php:8.0-nginx 8.0-nginx
77
- docker build -t kooldev/php:8.0-nginx-prod 8.0-nginx-prod
8+
- docker build -t kooldev/php:8.0-node 8.0-node
89
build-8.1:
9-
- docker build --pull -t kooldev/php:8.1 8.1
10-
- docker build --pull -t kooldev/php:8.1-prod 8.1-prod
10+
- docker build -t kooldev/php:8.1 8.1
11+
- docker build -t kooldev/php:8.1-prod 8.1-prod
1112
- docker build -t kooldev/php:8.1-nginx 8.1-nginx
1213
- docker build -t kooldev/php:8.1-nginx-prod 8.1-nginx-prod
14+
- docker build -t kooldev/php:8.1-node 8.1-node
1315
build-8.2:
14-
- docker build --pull -t kooldev/php:8.2 8.2
15-
- docker build --pull -t kooldev/php:8.2-prod 8.2-prod
16-
- docker build --pull -t kooldev/php:8.2-node 8.2-node
16+
- docker build -t kooldev/php:8.2 8.2
17+
- docker build -t kooldev/php:8.2-prod 8.2-prod
1718
- docker build -t kooldev/php:8.2-nginx 8.2-nginx
1819
- docker build -t kooldev/php:8.2-nginx-prod 8.2-nginx-prod
20+
- docker build -t kooldev/php:8.2-node 8.2-node
1921
build:
2022
# parse templates
2123
- kool run template

template/Dockerfile-node.blade.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM {{ $from }}
2+
3+
RUN apk add --update --no-cache npm yarn \
4+
&& rm -rf /var/cache/apk/* /tmp/*

template/Dockerfile.blade.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@
8484
&& apk del .build-deps \
8585
&& rm -rf /var/cache/apk/* /tmp/*
8686

87-
@if ($with_node ?? false)
88-
RUN apk add --update --no-cache npm
89-
90-
@endif
9187
COPY kool.ini /kool/kool.tmpl
9288
COPY zz-docker.conf /kool/zz-docker.tmpl
9389
COPY entrypoint /kool/entrypoint

0 commit comments

Comments
 (0)