Skip to content

Commit 00ba5c9

Browse files
committed
Add Wolfi images
1 parent 75a9208 commit 00ba5c9

File tree

10 files changed

+366
-3
lines changed

10 files changed

+366
-3
lines changed

.github/workflows/ci-wolfi.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Continuous Integration (Wolfi)
2+
on:
3+
pull_request:
4+
jobs:
5+
build:
6+
name: Building "${{ matrix.php }}"
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
php: ["8.1", "8.2"]
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: dbhi/qus/action@main
15+
- run: docker run --rm -v "${PWD}":/work cgr.dev/chainguard/melange keygen
16+
- run: docker run --privileged --rm -v "${PWD}":/work cgr.dev/chainguard/melange build wolfi-apk-${{ matrix.php }}-slim.yaml --arch amd64,arm64 --signing-key melange.rsa
17+
- run: docker run --privileged --rm -v "${PWD}":/work cgr.dev/chainguard/melange build wolfi-apk-${{ matrix.php }}.yaml --arch amd64,arm64 --signing-key melange.rsa
18+
- run: docker run --rm -v ${PWD}:/work cgr.dev/chainguard/apko build --arch amd64,arm64 wolfi-image-${{ matrix.php }}-slim.yaml wyrihaximusnet/php:${{ matrix.php }}-nts-wolfi-slim php-${{ matrix.php }}-slim.tar -k melange.rsa.pub
19+
- run: docker run --rm -v ${PWD}:/work cgr.dev/chainguard/apko build --arch amd64,arm64 wolfi-image-${{ matrix.php }}.yaml wyrihaximusnet/php:${{ matrix.php }}-nts-wolfi-slim php-${{ matrix.php }}.tar -k melange.rsa.pub
20+
- run: docker load < php-${{ matrix.php }}-slim.tar
21+
- run: docker load < php-${{ matrix.php }}.tar
22+
- run: docker run --rm -t wyrihaximusnet/php:${{ matrix.php }}-nts-wolfi-slim-amd64 -v
23+
- run: docker run --rm -t wyrihaximusnet/php:${{ matrix.php }}-nts-wolfi-slim-amd64 -m
24+
- run: docker images

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
push:
99
branches:
1010
- master
11-
pull_request:
11+
# pull_request:
1212
schedule:
1313
- cron: '13 4 * * *'
1414
jobs:
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
echo "Generate full image list"
9797
php utils/all-images.php
98-
98+
9999
if [ "${{ github.event_name }}" == "schedule" ] ; then
100100
echo "This is a scheduled run, scanning for CVE's"
101101
php utils/all-image-tags.php | xargs -I % sh -c 'docker run -v /tmp/trivy:/var/lib/trivy -v /var/run/docker.sock:/var/run/docker.sock -t aquasec/trivy:latest --cache-dir /var/lib/trivy image --exit-code 1 --no-progress $(php -r "echo explode(\"#\", \"%\")[0];") > /dev/null || echo "%|"' >> images_with.cves
@@ -108,7 +108,7 @@ jobs:
108108
109109
echo "Looking for newer upstream images"
110110
php utils/newer-upstream-images.php >> images-that-need-updating.list
111-
111+
112112
printf "image=%s" $(php utils/deduplicate-list.php) >> $GITHUB_OUTPUT
113113
exit 0
114114
fi

wolfi-apk-8.1-slim.yaml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
package:
2+
name: php-81-slim
3+
version: 0.1.0
4+
description: PHP 8.1 Slim
5+
target-architecture:
6+
- all
7+
copyright:
8+
- license: MIT
9+
paths:
10+
- "*"
11+
dependencies:
12+
runtime:
13+
- php81
14+
- php81-common
15+
- php81-curl
16+
- php81-openssl
17+
- php81-dev
18+
- php81-pear
19+
- php81-xml
20+
- php81-dom
21+
- php81-pcntl
22+
- php81-pgsql
23+
- php81-pdo
24+
- php81-pdo_pgsql
25+
- php81-bcmath
26+
- php81-zip
27+
- php81-gmp
28+
- php81-iconv
29+
- php81-opcache
30+
- php81-intl
31+
- php81-sockets
32+
- libuv-dev
33+
- icu-dev
34+
# - libevent-dev
35+
36+
environment:
37+
contents:
38+
repositories:
39+
- https://dl-cdn.alpinelinux.org/alpine/edge/main
40+
- https://dl-cdn.alpinelinux.org/alpine/edge/community
41+
packages:
42+
- ca-certificates-bundle
43+
- curl
44+
- git
45+
- php81
46+
- php81-common
47+
- php81-curl
48+
- php81-openssl
49+
- php81-dev
50+
- php81-pear
51+
- php81-xml
52+
- php81-dom
53+
- autoconf
54+
- dpkg-dev
55+
- file
56+
- g++
57+
- gcc
58+
- libc-dev
59+
- make
60+
- re2c
61+
- composer
62+
- libuv-dev
63+
- icu-dev
64+
# - libevent-dev
65+
- openssl-dev
66+
- coreutils
67+
- procps
68+
69+
pipeline:
70+
- name: install pear
71+
runs: |
72+
set -x
73+
wget -q pear.php.net/go-pear.phar
74+
php go-pear.phar
75+
mkdir -p $(php-config --extension-dir 2>/dev/null)
76+
mkdir -p "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)"
77+
mkdir -p "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)"
78+
- name: ext-uv
79+
runs: |
80+
git clone https://github.com/amphp/ext-uv uv
81+
cd uv
82+
git fetch
83+
git pull
84+
phpize
85+
./configure
86+
cat Makefile
87+
make install
88+
echo "extension=uv.so" > "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)/uv.ini"
89+
cp "$(php-config --extension-dir 2>/dev/null)/uv.so" "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)/uv.so"
90+
- name: ext-eio
91+
runs: |
92+
pecl install eio || pecl install eio-beta
93+
echo "extension=eio.so" > "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)/eio.ini"
94+
cp "$(php-config --extension-dir 2>/dev/null)/eio.so" "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)/eio.so"
95+
# - name: ext-event
96+
# runs: |
97+
# pecl install event
98+
# echo "extension=event.so" > "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)/event.ini"
99+
# cp "$(php-config --extension-dir 2>/dev/null)/event.so" "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)/event.so"
100+
- name: wait-for
101+
runs: |
102+
mkdir -p "${{targets.destdir}}/bin"
103+
wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > "${{targets.destdir}}/bin/wait-for"
104+
- name: clean up pear
105+
runs: |
106+
rm go-pear.phar
107+
- uses: strip

wolfi-apk-8.1.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package:
2+
name: php-81
3+
version: 0.1.0
4+
description: PHP 8.1
5+
target-architecture:
6+
- all
7+
copyright:
8+
- license: MIT
9+
paths:
10+
- "*"
11+
dependencies:
12+
runtime:
13+
- php81-slim
14+
- php81-gd
15+
- php81-vips
16+
17+
environment:
18+
contents:
19+
keyring:
20+
- /work/melange.rsa.pub
21+
repositories:
22+
- https://dl-cdn.alpinelinux.org/alpine/edge/main
23+
- https://dl-cdn.alpinelinux.org/alpine/edge/community
24+
- '@local /work/packages'
25+
packages:
26+
- php81-slim@local
27+
28+
pipeline:
29+
- uses: strip

wolfi-apk-8.2-slim.yaml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
package:
2+
name: php-82-slim
3+
version: 0.1.0
4+
description: PHP 8.2 Slim
5+
target-architecture:
6+
- all
7+
copyright:
8+
- license: MIT
9+
paths:
10+
- "*"
11+
dependencies:
12+
runtime:
13+
- php82
14+
- php82-common
15+
- php82-curl
16+
- php82-openssl
17+
- php82-dev
18+
- php82-pear
19+
- php82-xml
20+
- php82-dom
21+
- php82-pcntl
22+
- php82-pgsql
23+
- php82-pdo
24+
- php82-pdo_pgsql
25+
- php82-bcmath
26+
- php82-zip
27+
- php82-gmp
28+
- php82-iconv
29+
- php82-opcache
30+
- php82-intl
31+
- php82-sockets
32+
- libuv-dev
33+
- icu-dev
34+
# - libevent-dev
35+
36+
environment:
37+
contents:
38+
repositories:
39+
- https://dl-cdn.alpinelinux.org/alpine/edge/main
40+
- https://dl-cdn.alpinelinux.org/alpine/edge/community
41+
packages:
42+
- ca-certificates-bundle
43+
- curl
44+
- git
45+
- php82
46+
- php82-common
47+
- php82-curl
48+
- php82-openssl
49+
- php82-dev
50+
- php82-pear
51+
- php82-xml
52+
- php82-dom
53+
- autoconf
54+
- dpkg-dev
55+
- file
56+
- g++
57+
- gcc
58+
- libc-dev
59+
- make
60+
- re2c
61+
- composer
62+
- libuv-dev
63+
- icu-dev
64+
# - libevent-dev
65+
- openssl-dev
66+
- coreutils
67+
- procps
68+
69+
pipeline:
70+
# - name: install pear
71+
# runs: |
72+
# set -x
73+
# wget -q pear.php.net/go-pear.phar
74+
# php go-pear.phar
75+
# mkdir -p $(php-config --extension-dir 2>/dev/null)
76+
# mkdir -p "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)"
77+
# mkdir -p "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)"
78+
# - name: ext-uv
79+
# runs: |
80+
# git clone https://github.com/amphp/ext-uv uv
81+
# cd uv
82+
# git fetch
83+
# git pull
84+
# phpize
85+
# ./configure
86+
# cat Makefile
87+
# make install
88+
# echo "extension=uv.so" > "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)/uv.ini"
89+
# cp "$(php-config --extension-dir 2>/dev/null)/uv.so" "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)/uv.so"
90+
# - name: ext-eio
91+
# runs: |
92+
# pecl install eio || pecl install eio-beta
93+
# echo "extension=eio.so" > "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)/eio.ini"
94+
# cp "$(php-config --extension-dir 2>/dev/null)/eio.so" "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)/eio.so"
95+
# - name: ext-event
96+
# runs: |
97+
# pecl install event
98+
# echo "extension=event.so" > "${{targets.destdir}}$(php-config --ini-dir 2>/dev/null)/event.ini"
99+
# cp "$(php-config --extension-dir 2>/dev/null)/event.so" "${{targets.destdir}}$(php-config --extension-dir 2>/dev/null)/event.so"
100+
- name: wait-for
101+
runs: |
102+
mkdir -p "${{targets.destdir}}/bin"
103+
wget -q -O - https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > "${{targets.destdir}}/bin/wait-for"
104+
# - name: clean up pear
105+
# runs: |
106+
# rm go-pear.phar
107+
- uses: strip

wolfi-apk-8.2.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package:
2+
name: php-82
3+
version: 0.1.0
4+
description: PHP 8.2
5+
target-architecture:
6+
- all
7+
copyright:
8+
- license: MIT
9+
paths:
10+
- "*"
11+
dependencies:
12+
runtime:
13+
- php82-slim
14+
- php82-gd
15+
- php82-vips
16+
17+
pipeline:
18+
- uses: strip

wolfi-image-8.1-slim.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
contents:
2+
repositories:
3+
- https://dl-cdn.alpinelinux.org/alpine/edge/main
4+
- https://dl-cdn.alpinelinux.org/alpine/edge/community
5+
- '@local /work/packages'
6+
packages:
7+
- alpine-baselayout-data
8+
- ca-certificates-bundle
9+
- php-81-slim@local
10+
accounts:
11+
groups:
12+
- groupname: nonroot
13+
gid: 65532
14+
users:
15+
- username: nonroot
16+
uid: 65532
17+
run-as: 65532
18+
entrypoint:
19+
command: php

wolfi-image-8.1.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
contents:
2+
repositories:
3+
- https://dl-cdn.alpinelinux.org/alpine/edge/main
4+
- https://dl-cdn.alpinelinux.org/alpine/edge/community
5+
- '@local /work/packages'
6+
packages:
7+
- alpine-baselayout-data
8+
- ca-certificates-bundle
9+
- php-81-slim@local
10+
- php-81@local
11+
accounts:
12+
groups:
13+
- groupname: nonroot
14+
gid: 65532
15+
users:
16+
- username: nonroot
17+
uid: 65532
18+
run-as: 65532
19+
entrypoint:
20+
command: php

wolfi-image-8.2-slim.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
contents:
2+
repositories:
3+
- https://dl-cdn.alpinelinux.org/alpine/edge/main
4+
- https://dl-cdn.alpinelinux.org/alpine/edge/community
5+
- '@local /work/packages'
6+
packages:
7+
- alpine-baselayout-data
8+
- ca-certificates-bundle
9+
- php-82-slim@local
10+
accounts:
11+
groups:
12+
- groupname: nonroot
13+
gid: 65532
14+
users:
15+
- username: nonroot
16+
uid: 65532
17+
run-as: 65532
18+
entrypoint:
19+
command: php

wolfi-image-8.2.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
contents:
2+
repositories:
3+
- https://dl-cdn.alpinelinux.org/alpine/edge/main
4+
- https://dl-cdn.alpinelinux.org/alpine/edge/community
5+
- '@local /work/packages'
6+
packages:
7+
- alpine-baselayout-data
8+
- ca-certificates-bundle
9+
- php-82-slim@local
10+
- php-82@local
11+
accounts:
12+
groups:
13+
- groupname: nonroot
14+
gid: 65532
15+
users:
16+
- username: nonroot
17+
uid: 65532
18+
run-as: 65532
19+
entrypoint:
20+
command: php

0 commit comments

Comments
 (0)