Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
446 changes: 290 additions & 156 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# distroless-php

Distroless PHP images built with Bazel, using [rules_distroless](https://github.com/GoogleContainerTools/rules_distroless).

## Updating Debian package snapshots

The YAML manifests pin Debian packages to a specific [snapshot.debian.org](https://snapshot.debian.org) timestamp for reproducibility. When snapshots expire or return 404s, you need to update the timestamps and regenerate the lock files.

### 1. Find a recent snapshot timestamp

Browse the available snapshots:

- Debian archive: https://snapshot.debian.org/archive/debian/
- Debian security: https://snapshot.debian.org/archive/debian-security/

Pick a recent timestamp (e.g. `20260210T022610Z`).

### 2. Update the YAML manifests

Replace the snapshot URLs in all manifest files:

- `php/common.yaml`
- `php/wkhtmltopdf.yaml`
- `php/7.2/php.yaml`
- `php/7.4/php.yaml`
- `php/8.3/php.yaml`
- `php/8.4/php.yaml`
- `nginx/bookworm.yaml`

Each file has three Debian snapshot sources to update:

```yaml
sources:
- channel: bookworm main contrib
url: https://snapshot.debian.org/archive/debian/<TIMESTAMP>
- channel: bookworm-security main
url: https://snapshot.debian.org/archive/debian-security/<TIMESTAMP>
- channel: bookworm-updates main
url: https://snapshot.debian.org/archive/debian/<TIMESTAMP>
```

### 3. Regenerate the lock files

Run the lock target for each repository:

```sh
bazel run @php-common//:lock
bazel run @php-wkhtmltopdf//:lock
bazel run @php-7.2//:lock
bazel run @php-7.4//:lock
bazel run @php-8.3//:lock
bazel run @php-8.4//:lock
bazel run @nginx-bookworm//:lock
```

This resolves packages from the new snapshots and writes updated `.lock.json` files.
84 changes: 54 additions & 30 deletions nginx/bookworm.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,34 @@
{
"arch": "amd64",
"dependencies": [],
"key": "nginx_1.22.1-9_amd64",
"key": "nginx_1.22.1-9-p-deb12u3_amd64",
"name": "nginx",
"sha256": "2916d7fc95b33a9df9ffb984e4c05d7a6f4fe3abb950b9127f0ad9a4adbd88aa",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/n/nginx/nginx_1.22.1-9_amd64.deb",
"version": "1.22.1-9"
"sha256": "cba42902e1c113fdadfdd45dd33e55a42771bdbfc072e774612234782bdc0aae",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/n/nginx/nginx_1.22.1-9+deb12u3_amd64.deb"
],
"version": "1.22.1-9+deb12u3"
},
{
"arch": "amd64",
"dependencies": [],
"key": "libc6_2.36-9-p-deb12u9_amd64",
"key": "libc6_2.36-9-p-deb12u13_amd64",
"name": "libc6",
"sha256": "3a043b9dbf1a8c8b5a9e2268253e6dca8c7d431bd7a202fea96364abf374fea9",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/g/glibc/libc6_2.36-9+deb12u9_amd64.deb",
"version": "2.36-9+deb12u9"
"sha256": "3d8072c73b017e907bbf44b7db870687888a991961d74f1ecbba6b9458f32a2c",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/g/glibc/libc6_2.36-9+deb12u13_amd64.deb"
],
"version": "2.36-9+deb12u13"
},
{
"arch": "amd64",
"dependencies": [],
"key": "libcrypt1_1-4.4.33-2_amd64",
"name": "libcrypt1",
"sha256": "f5f60a5cdfd4e4eaa9438ade5078a57741a7a78d659fcb0c701204f523e8bd29",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/libx/libxcrypt/libcrypt1_4.4.33-2_amd64.deb",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/libx/libxcrypt/libcrypt1_4.4.33-2_amd64.deb"
],
"version": "1:4.4.33-2"
},
{
Expand All @@ -33,52 +39,64 @@
"key": "libpcre2-8-0_10.42-1_amd64",
"name": "libpcre2-8-0",
"sha256": "030db54f4d76cdfe2bf0e8eb5f9efea0233ab3c7aa942d672c7b63b52dbaf935",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/p/pcre2/libpcre2-8-0_10.42-1_amd64.deb",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/p/pcre2/libpcre2-8-0_10.42-1_amd64.deb"
],
"version": "10.42-1"
},
{
"arch": "amd64",
"dependencies": [],
"key": "libssl3_3.0.15-1_deb12u1_amd64",
"key": "libssl3_3.0.18-1_deb12u2_amd64",
"name": "libssl3",
"sha256": "d7897e6c55a8d9e229dcf16b0b1d472d7f7be741b2b3b2ac624908ff63215a93",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/o/openssl/libssl3_3.0.15-1~deb12u1_amd64.deb",
"version": "3.0.15-1~deb12u1"
"sha256": "ed44f11b74763cded2ad406f4de4d585ea27b0ce6377e7c8d98c2ddf2ed35cb3",
"urls": [
"https://snapshot.debian.org/archive/debian-security/20260209T193433Z/pool/updates/main/o/openssl/libssl3_3.0.18-1~deb12u2_amd64.deb"
],
"version": "3.0.18-1~deb12u2"
},
{
"arch": "amd64",
"dependencies": [],
"key": "zlib1g_1-1.2.13.dfsg-1_amd64",
"name": "zlib1g",
"sha256": "d7dd1d1411fedf27f5e27650a6eff20ef294077b568f4c8c5e51466dc7c08ce4",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/z/zlib/zlib1g_1.2.13.dfsg-1_amd64.deb",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/z/zlib/zlib1g_1.2.13.dfsg-1_amd64.deb"
],
"version": "1:1.2.13.dfsg-1"
},
{
"arch": "arm64",
"dependencies": [],
"key": "nginx_1.22.1-9_arm64",
"key": "nginx_1.22.1-9-p-deb12u3_arm64",
"name": "nginx",
"sha256": "eaefeb0a9c1d1cd8022ecc9a5977eecba063b3674c37fb600e4486e6140f6e11",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/n/nginx/nginx_1.22.1-9_arm64.deb",
"version": "1.22.1-9"
"sha256": "8e5af919283a233315125e97e179240460b6076ba695c7ef766619ff6c2eb06f",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/n/nginx/nginx_1.22.1-9+deb12u3_arm64.deb"
],
"version": "1.22.1-9+deb12u3"
},
{
"arch": "arm64",
"dependencies": [],
"key": "libc6_2.36-9-p-deb12u9_arm64",
"key": "libc6_2.36-9-p-deb12u13_arm64",
"name": "libc6",
"sha256": "564ad8beb7d6d80620ed5f6387cd0da5e3bc839e0c43293b4233678e8366c283",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/g/glibc/libc6_2.36-9+deb12u9_arm64.deb",
"version": "2.36-9+deb12u9"
"sha256": "03c3909c47a6df9f6f05357474efefca9bc30212069135a7c354fa78a1ec2415",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/g/glibc/libc6_2.36-9+deb12u13_arm64.deb"
],
"version": "2.36-9+deb12u13"
},
{
"arch": "arm64",
"dependencies": [],
"key": "libcrypt1_1-4.4.33-2_arm64",
"name": "libcrypt1",
"sha256": "eea0ad76ea5eb507127fea0c291622ea4ecdbb71c4b9a8ed9c76ae33fc1a0127",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/libx/libxcrypt/libcrypt1_4.4.33-2_arm64.deb",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/libx/libxcrypt/libcrypt1_4.4.33-2_arm64.deb"
],
"version": "1:4.4.33-2"
},
{
Expand All @@ -87,25 +105,31 @@
"key": "libpcre2-8-0_10.42-1_arm64",
"name": "libpcre2-8-0",
"sha256": "b2448d0a8a3db7fbeac231e7ef93811346c1fb5f96ccf6f631701d8a4eb39206",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/p/pcre2/libpcre2-8-0_10.42-1_arm64.deb",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/p/pcre2/libpcre2-8-0_10.42-1_arm64.deb"
],
"version": "10.42-1"
},
{
"arch": "arm64",
"dependencies": [],
"key": "libssl3_3.0.15-1_deb12u1_arm64",
"key": "libssl3_3.0.18-1_deb12u2_arm64",
"name": "libssl3",
"sha256": "468debe7aad7bd73592dcdbdab4d778558a4f538efd1b960f24e343fdbc0654d",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/o/openssl/libssl3_3.0.15-1~deb12u1_arm64.deb",
"version": "3.0.15-1~deb12u1"
"sha256": "30b2d6c27fd4a2f5ef554ac3b86c96e8a3abbbfb454c6dbe7e308ce9df36f8c5",
"urls": [
"https://snapshot.debian.org/archive/debian-security/20260209T193433Z/pool/updates/main/o/openssl/libssl3_3.0.18-1~deb12u2_arm64.deb"
],
"version": "3.0.18-1~deb12u2"
},
{
"arch": "arm64",
"dependencies": [],
"key": "zlib1g_1-1.2.13.dfsg-1_arm64",
"name": "zlib1g",
"sha256": "52b8b8a145bbe1956bba82034f77022cbef0c3d0885c9e32d9817a7932fe1913",
"url": "https://snapshot.debian.org/archive/debian/20241211T143334Z/pool/main/z/zlib/zlib1g_1.2.13.dfsg-1_arm64.deb",
"urls": [
"https://snapshot.debian.org/archive/debian/20260210T022610Z/pool/main/z/zlib/zlib1g_1.2.13.dfsg-1_arm64.deb"
],
"version": "1:1.2.13.dfsg-1"
}
],
Expand Down
6 changes: 3 additions & 3 deletions nginx/bookworm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ version: 1

sources:
- channel: bookworm main contrib
url: https://snapshot.debian.org/archive/debian/20241211T143334Z
url: https://snapshot.debian.org/archive/debian/20260210T022610Z
- channel: bookworm-security main
url: https://snapshot.debian.org/archive/debian-security/20241211T143334Z
url: https://snapshot.debian.org/archive/debian-security/20260209T193433Z
- channel: bookworm-updates main
url: https://snapshot.debian.org/archive/debian/20241211T143334Z
url: https://snapshot.debian.org/archive/debian/20260210T022610Z

archs:
- "amd64"
Expand Down
Loading
Loading