Skip to content

Commit 050476a

Browse files
committed
notable change: - fix: core: rootfs.tar path - core: support deb822 style config - layer: ruby3: lock gem&bundler verison - layer package update
2 parents e48e2b6 + f84577a commit 050476a

File tree

6 files changed

+44
-44
lines changed

6 files changed

+44
-44
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "docker-stash",
4-
"version": "0.4.2",
4+
"version": "0.4.3",
55
"description": "A collection of strange functions, for development",
66
"author": "dr-js",
77
"license": "MIT",

source/debian12/build-core.js

+10-14
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ runKit(async (kit) => {
1919

2020
const URL_CACHE_HASH = 'https://api.github.com/repos/debuerreotype/docker-debian-artifacts/git/refs/heads' // use all branch info as cache hash
2121
const URL_CORE_IMAGE_MAP = {
22-
'amd64': 'https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-amd64/bookworm/slim/rootfs.tar.xz',
23-
'arm64': 'https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-arm64v8/bookworm/slim/rootfs.tar.xz'
22+
'amd64': 'https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-amd64/bookworm/slim/oci/blobs/rootfs.tar.gz',
23+
'arm64': 'https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-arm64v8/bookworm/slim/oci/blobs/rootfs.tar.gz'
2424
}
2525

2626
const coreImageBufferMap = await fetchGitHubBufferMapWithLocalCache(URL_CORE_IMAGE_MAP, URL_CACHE_HASH, kit.fromTemp('debian12', 'core-github'))
@@ -49,7 +49,7 @@ runKit(async (kit) => {
4949
kit.padLog('assemble "/" (context)')
5050
await resetDirectory(PATH_BUILD)
5151
for (const DOCKER_BUILD_ARCH_INFO of DOCKER_BUILD_ARCH_INFO_LIST) {
52-
await writeBuffer(kit.fromOutput(PATH_BUILD, `rootfs.tar.xz.${DOCKER_BUILD_ARCH_INFO.key}`), coreImageBufferMap[ DOCKER_BUILD_ARCH_INFO.key ])
52+
await writeBuffer(kit.fromOutput(PATH_BUILD, `rootfs.tar.gz.${DOCKER_BUILD_ARCH_INFO.key}`), coreImageBufferMap[ DOCKER_BUILD_ARCH_INFO.key ])
5353
await writeBuffer(kit.fromOutput(PATH_BUILD, `Dockerfile.${DOCKER_BUILD_ARCH_INFO.key}`), dockerfileBufferMap[ DOCKER_BUILD_ARCH_INFO.key ])
5454
}
5555

@@ -89,7 +89,7 @@ const getDockerfileString = ({
8989
FROM scratch
9090
9191
${_ && 'use prepared fs'}
92-
ADD "rootfs.tar.xz.${DOCKER_BUILD_ARCH_INFO.key}" /
92+
ADD "rootfs.tar.gz.${DOCKER_BUILD_ARCH_INFO.key}" /
9393
9494
LABEL arg.DOCKER_BUILD_ARCH=${JSON.stringify(DOCKER_BUILD_ARCH_INFO.key)}
9595
ENV DOCKER_BUILD_ARCH=${JSON.stringify(DOCKER_BUILD_ARCH_INFO.key)}
@@ -101,25 +101,21 @@ ENV LANG C.UTF-8
101101
ENV LC_ALL C.UTF-8
102102
103103
RUN set -ex \\
104-
&& { \\${_ && 'reset apt source list with bookworm-backports'}
105-
echo 'deb http://deb.debian.org/debian bookworm main'; \\
106-
echo 'deb http://deb.debian.org/debian bookworm-updates main'; \\
107-
echo 'deb http://deb.debian.org/debian bookworm-backports main'; \\
108-
echo 'deb http://deb.debian.org/debian-security/ bookworm-security main'; \\
109-
} > /etc/apt/sources.list \\
110-
&& { \\${_ && 'set apt to use bookworm-backports by default'}
104+
\\${_ && 'apt: enable backports sources (for deb822 style config)'}
105+
&& sed -i 's/bookworm-updates/bookworm-updates bookworm-backports/' /etc/apt/sources.list.d/debian.sources \\
106+
&& { \\${_ && 'apt: use backports by default'}
111107
echo 'Package: *'; \\
112108
echo 'Pin: release a=bookworm-backports'; \\
113109
echo 'Pin-Priority: 800'; \\
114110
} > /etc/apt/preferences.d/backports \\
115-
&& { \\${_ && 'reset dpkg file filter # https://askubuntu.com/a/628410'}
111+
&& { \\${_ && 'apt: reset dpkg file filter # https://askubuntu.com/a/628410'}
116112
echo 'path-exclude=/usr/share/doc/*'; \\
117113
echo 'path-include=/usr/share/doc/*/copyright'; \\
118114
echo 'path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo'; \\
119115
echo 'path-exclude=/usr/share/man/*'; \\
120116
echo 'path-exclude=/usr/share/info/*'; \\
121117
} > /etc/dpkg/dpkg.cfg.d/excludes \\
122-
\\${_ && 'prepare apt cache # https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md#example-cache-apt-packages'}
118+
\\${_ && 'apt: prepare apt cache # https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md#example-cache-apt-packages'}
123119
&& shopt -s nullglob \\
124120
&& rm -rf \\
125121
/etc/apt/apt.conf.d/docker-clean \\
@@ -128,7 +124,7 @@ RUN set -ex \\
128124
/var/lib/apt/* \\
129125
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \\
130126
&& shopt -u nullglob \\
131-
\\${_ && 'check system time, apt update will fail if the time is off too much'}
127+
\\${_ && 'apt: check system time, apt update will fail if the time is off too much'}
132128
&& date -uIs
133129
134130
RUN \\${_ && 'check: https://github.com/moby/buildkit/blob/v0.9.0/frontend/dockerfile/docs/syntax.md'}

source/debian12/build-layer-script/7-1-ruby2-install.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ apt-update
8787
libgmp-dev \
8888
libdb-dev
8989

90+
rm -rf /usr/local/share/man/*
91+
9092
ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
9193
apt-clear
9294

93-
# gem
95+
9496
gem install rubygems-update -v 3.4.22 --no-document && update_rubygems # gem update --no-document --system # NOTE: v3.5 requires ruby@3, https://github.com/rubygems/rubygems/issues/2534
9597
gem-uninstall rubygems-update # remove gem update dependency
9698
gem-clear

source/debian12/build-layer-script/7-1-ruby3-install.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ apt-update
6868
ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
6969
apt-clear
7070

71-
# gem
72-
gem update --no-document --system
71+
72+
gem install rubygems-update -v 3.5.23 --no-document && update_rubygems # gem update --no-document --system # NOTE: to lock down bundler version
7373
gem-uninstall rubygems-update # remove gem update dependency
7474
gem-clear
7575

source/res-list.js

+26-24
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
const RES_CORE_DEB12 = [
2-
// update at 2024/08/05, to find download start from: https://packages.debian.org/search?keywords=ca-certificates
2+
// update at 2024/12/19, start from: https://packages.debian.org/search?keywords=ca-certificates
33
[ 'https://ftp.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20230311_all.deb '.trim(), '5308b9bd88eebe2a48be3168cb3d87677aaec5da9c63ad0cf561a29b8219115c' ],
4-
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/openssl_3.0.13-1~deb12u1_amd64.deb '.trim(), '262faebdc38b64e9e0553388e8608b0b6ae1b56871e7a8b09737ab0f2df11f8c' ],
5-
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/openssl_3.0.13-1~deb12u1_arm64.deb '.trim(), 'fe4726cd05854fd6db1efe869e158b34b23789d0742144d2313e060331001dc3' ],
6-
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/libssl3_3.0.13-1~deb12u1_amd64.deb '.trim(), '8e88b98b3fc634721d0899f498d4cf2e62405faaab6582123c7923b1ec8129e1' ],
7-
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/libssl3_3.0.13-1~deb12u1_arm64.deb '.trim(), 'aeffbc4770e2da3a356eb3c8369e79f89623ffc4bc14eb18d6ff29d9bdcb1fba' ],
8-
// update at 2023/02/28, to find from: https://packages.debian.org/search?keywords=libjemalloc2
4+
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/openssl_3.0.15-1~deb12u1_amd64.deb '.trim(), 'c9c37660d902f2a43dfbbf619b3f5f413cee298d8f317829e3c11cfff9e174aa' ],
5+
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/openssl_3.0.15-1~deb12u1_arm64.deb '.trim(), '28d03482e8c550bd65930bd41af99bbc9bff1125474010ccec9024ceffc39744' ],
6+
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/libssl3_3.0.15-1~deb12u1_amd64.deb '.trim(), 'd7897e6c55a8d9e229dcf16b0b1d472d7f7be741b2b3b2ac624908ff63215a93' ],
7+
[ 'https://ftp.debian.org/debian/pool/main/o/openssl/libssl3_3.0.15-1~deb12u1_arm64.deb '.trim(), '468debe7aad7bd73592dcdbdab4d778558a4f538efd1b960f24e343fdbc0654d' ],
8+
// update at 2023/02/28, check: https://packages.debian.org/search?keywords=libjemalloc2
99
[ 'https://ftp.debian.org/debian/pool/main/j/jemalloc/libjemalloc2_5.3.0-1_amd64.deb '.trim(), 'a4117c23c5c8acf6c9678a6cb086f000b79476369da7efe8a78a70826956ad3d' ],
1010
[ 'https://ftp.debian.org/debian/pool/main/j/jemalloc/libjemalloc2_5.3.0-1_arm64.deb '.trim(), '866eba7688ec5cbb98200a05540c4909df6320557371b634b5d394cd32b9f252' ]
1111
]
1212

1313
const RES_NODE = [
14-
// update at 2024/08/05, to find download, check: ".github/check-layer-package-latest.js"
15-
[ 'https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.16.0-1nodesource1_amd64.deb', 'a78c0997f37bf41e7b8e999ecec49da0a2d46b7db874e6f74932e75e1b9616ed' ],
16-
[ 'https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.16.0-1nodesource1_arm64.deb', '42c7625ea2749c1108c701b6b06197d756a9683b5a1f1645fbdf52c586fb21a4' ],
17-
// update at 2024/08/05, to find download from: `{ npm view npm@next-10; npm view @dr-js/core@latest; npm view @dr-js/dev@latest; } | grep -e tarball -e integrity`
18-
[ 'https://registry.npmjs.org/npm/-/npm-10.8.2.tgz '.trim(), 'x/AIjFIKRllrhcb48dqUNAAZl0ig9+qMuN91RpZo3Cb2+zuibfh+KISl6+kVVyktDz230JKc208UkQwwMqyB+w==:sha512:base64' ],
14+
// update at 2025/02/14, check: ".github/check-layer-package-latest.js"
15+
[ 'https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.18.3-1nodesource1_amd64.deb', '5ca8dda65890dfb4aa8eb060c3a502aa3e5775d7362ed741b2613fa5cc58ba55' ],
16+
[ 'https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/nodejs_20.18.3-1nodesource1_arm64.deb', 'a2dfe2d71946b89ef31b6c150c8c1e98925cc6efc2b73c48199d2b8c151c4cf6' ],
17+
// update at 2024/08/05, check: `{ npm view npm@next-10; npm view @dr-js/core@latest; npm view @dr-js/dev@latest; } | grep -e tarball -e integrity`
18+
[ 'https://registry.npmjs.org/npm/-/npm-10.9.2.tgz '.trim(), 'iriPEPIkoMYUy3F6f3wwSZAU93E0Eg6cHwIR6jzzOXWSy+SD/rOODEs74cVONHKSx2obXtuUoyidVEhISrisgQ==:sha512:base64' ],
1919
[ 'https://registry.npmjs.org/@dr-js/core/-/core-0.5.17.tgz '.trim(), 'xHPK1TEXbvTKyH1UafKZFWqSqZZaYEtTLZ6hVEvYasmm3sFSUPA0rbw/r1DPGRJ7QlLkdzCewS4t11C1B9l0DA==:sha512:base64', 'dr-js-@@@.tgz' ], // NOTE: fix filename
2020
[ 'https://registry.npmjs.org/@dr-js/dev/-/dev-0.5.14.tgz '.trim(), 'KWwHsqxHrOtuVNPTq2chms7bXsQnti05UXp7dQIWUGVqOC+nQs6uN1KlIRqwJXZ5eo2pZnNCjk+GQ3RcpEyfjg==:sha512:base64', 'dr-dev-@@@.tgz' ] // NOTE: fix filename
2121
]
2222
const RES_NGINX = [
23-
// update at 2024/06/25, to find download from: https://nginx.org/en/download.html
23+
// update at 2025/02/14, use Stable version, check: https://nginx.org/en/download.html
2424
// and: https://github.com/google/ngx_brotli
25-
[ 'https://nginx.org/download/nginx-1.26.1.tar.gz '.trim(), 'f9187468ff2eb159260bfd53867c25ff8e334726237acf227b9e870e53d3e36b' ], // TODO: need to calc hash yourself
25+
[ 'https://nginx.org/download/nginx-1.26.3.tar.gz '.trim(), '69ee2b237744036e61d24b836668aad3040dda461fe6f570f1787eab570c75aa' ], // TODO: need to calc hash yourself
2626
[ 'https://github.com/google/brotli/archive/ed738e84.zip '.trim(), 'a68ec12a898abc9cf248f21362620562041b7aab4d623ecd736f39bedf5002a0', 'brotli.zip' ], // specify filename // TODO: need to calc hash yourself
2727
[ 'https://github.com/google/ngx_brotli/archive/a71f9312.zip '.trim(), '96f23eb72488ffc570cbc474a928000b05b72f2682456ae357aeaf3ce71c626e', 'ngx-brotli.zip' ] // specify filename // TODO: need to calc hash yourself
2828
]
2929
const RES_GO = [
30-
// update at 2024/08/05, to find download from: https://go.dev/dl/
31-
[ 'https://go.dev/dl/go1.22.5.linux-amd64.tar.gz', '904b924d435eaea086515bc63235b192ea441bd8c9b198c507e85009e6e4c7f0' ],
32-
[ 'https://go.dev/dl/go1.22.5.linux-arm64.tar.gz', '8d21325bfcf431be3660527c1a39d3d9ad71535fabdf5041c826e44e31642b5a' ]
30+
// update at 2025/02/14, use 2nd-recent-minor version, check: https://go.dev/dl/
31+
[ 'https://go.dev/dl/go1.23.6.linux-amd64.tar.gz', '9379441ea310de000f33a4dc767bd966e72ab2826270e038e78b2c53c2e7802d' ],
32+
[ 'https://go.dev/dl/go1.23.6.linux-arm64.tar.gz', '561c780e8f4a8955d32bf72e46af0b5ee5e0debe1e4633df9a03781878219202' ]
3333
]
34-
// update at 2024/08/05, to find download, check: ".github/check-layer-package-latest.js"
34+
// update at 2025/02/14, check: ".github/check-layer-package-latest.js"
3535
const RES_F_BIT_DEB12 = [
36-
[ 'https://packages.fluentbit.io/debian/bookworm/pool/main/f/fluent-bit/fluent-bit_3.1.4_amd64.deb', '4bc8dc02645cb1203f3189e19feada36cd69335839d69a56067bafd5f1fafe9f' ],
37-
[ 'https://packages.fluentbit.io/debian/bookworm/pool/main/f/fluent-bit/fluent-bit_3.1.4_arm64.deb', 'de482e008e9b21fb4a55321435d6287a44ff04abc8f89ce9b91480ce803573a8' ]
36+
[ 'https://packages.fluentbit.io/debian/bookworm/pool/main/f/fluent-bit/fluent-bit_3.2.6_amd64.deb', 'd3104d1ef5c3aef4487d8802e35de413e2b8e9e9411560b39f825519e04be247' ],
37+
[ 'https://packages.fluentbit.io/debian/bookworm/pool/main/f/fluent-bit/fluent-bit_3.2.6_arm64.deb', 'e707a5521067ec19f8c3f35a0b9802a04671c49ce61effb23bd04220120449ab' ]
3838
]
39-
// update at 2024/06/25, to find download from: https://www.ruby-lang.org/en/downloads/releases/
39+
// update at 2024/06/25, from: https://www.ruby-lang.org/en/downloads/releases/
4040
// TODO: Ruby 2.7 reaches EOL
4141
const RES_RUBY2 = [
4242
[ 'https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.8.tar.gz', 'c2dab63cbc8f2a05526108ad419efa63a67ed4074dbbcf9fc2b1ca664cb45ba0' ],
4343
// for manual build openssl1.1 on Deb12, check: https://github.com/rbenv/ruby-build/discussions/1940#discussioncomment-3724881
44-
// update at 2024/06/25, to find download, check: https://github.com/rbenv/ruby-build/blob/v20240612/share/ruby-build/2.7.8
44+
// update at 2024/06/25, check: https://github.com/rbenv/ruby-build/blob/v20240612/share/ruby-build/2.7.8
4545
[ 'https://www.openssl.org/source/openssl-1.1.1w.tar.gz', 'cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8' ]
4646
]
4747
// TODO: NOTE:
@@ -50,10 +50,12 @@ const RES_RUBY2 = [
5050
// const RES_RUBY3 = [ [ 'https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.3.tar.gz', '83c05b2177ee9c335b631b29b8c077b4770166d02fa527f3a9f6a40d13f3cce2' ] ]
5151
const RES_RUBY3 = [ [ 'https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.6.tar.gz', '0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22' ] ]
5252

53-
// update at 2024/08/05, check version at: https://github.com/puppeteer/puppeteer/releases/latest
53+
// update at 2024/08/05, check version at: https://github.com/puppeteer/puppeteer/releases
5454
// and version mapping from Chrome => Puppeteer: https://github.com/puppeteer/puppeteer/blob/main/versions.json
55-
const PPTR_VER = '22.15.0' // ['127.0.6533.88', 'v22.15.0']
56-
const PPTR_VER_ARM64_DEB12 = '22.13.1' // ['126.0.6478.182', 'v22.13.1'] // https://packages.debian.org/bookworm/chromium (127.0.6533.88-1~deb12u1_amd64/126.0.6478.182-1~deb12u1_arm64)
55+
const PPTR_VER = '22.15.0' // [ 'v22.15.0', { "chrome": "127.0.6533.88", "firefox": "latest" } ]
56+
const PPTR_VER_ARM64_DEB12 = '22.15.0' // [ 'v22.15.0' , { "chrome": "127.0.6533.88", "firefox": "latest" } ]
57+
// https://packages.debian.org/bookworm/chromium (133.0.6943.53-1~deb12u1)
58+
// https://packages.debian.org/bookworm/firefox-esr (128.7.0esr-1~deb12u1)
5759

5860
module.exports = {
5961
RES_CORE_DEB12,

0 commit comments

Comments
 (0)