on the way to using a base os image that contains the main os start
This commit is contained in:
parent
265e4a4ebe
commit
d50d3ed999
3 changed files with 90 additions and 95 deletions
40
config.yml
40
config.yml
|
@ -15,77 +15,77 @@ releases:
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.26.3
|
- version: 5.26.3
|
||||||
sha256: e0a17cdaed5304aea1783e507e56bb0001dd72c46f211553ead3a580c3f38135
|
sha256: e0a17cdaed5304aea1783e507e56bb0001dd72c46f211553ead3a580c3f38135
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.24.4
|
- version: 5.24.4
|
||||||
sha256: 7f080287ff64750270689843ae945f02159a33cb8f2fc910248c15befba5db84
|
sha256: 7f080287ff64750270689843ae945f02159a33cb8f2fc910248c15befba5db84
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.22.4
|
- version: 5.22.4
|
||||||
sha256: 713243dce27d7aa0bdbf52b2070de5ce449f9ffbcc14a93efbc6f2beff0f5ce8
|
sha256: 713243dce27d7aa0bdbf52b2070de5ce449f9ffbcc14a93efbc6f2beff0f5ce8
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.20.3
|
- version: 5.20.3
|
||||||
sha256: 3524e3a76b71650ab2f794fd68e45c366ec375786d2ad2dca767da424bbb9b4a
|
sha256: 3524e3a76b71650ab2f794fd68e45c366ec375786d2ad2dca767da424bbb9b4a
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: gz
|
type: gz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.30.3
|
- version: 5.30.3
|
||||||
sha256: 6967595f2e3f3a94544c35152f9a25e0cb8ea24ae45f4bf1882f2e33f4a400f4
|
sha256: 6967595f2e3f3a94544c35152f9a25e0cb8ea24ae45f4bf1882f2e33f4a400f4
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.32.1
|
- version: 5.32.1
|
||||||
sha256: 57cc47c735c8300a8ce2fa0643507b44c4ae59012bfdad0121313db639e02309
|
sha256: 57cc47c735c8300a8ce2fa0643507b44c4ae59012bfdad0121313db639e02309
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.34.0
|
- version: 5.34.0
|
||||||
sha256: 82c2e5e5c71b0e10487a80d79140469ab1f8056349ca8545140a224dbbed7ded
|
sha256: 82c2e5e5c71b0e10487a80d79140469ab1f8056349ca8545140a224dbbed7ded
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.34.1
|
- version: 5.34.1
|
||||||
sha256: 6d52cf833ff1af27bb5e986870a2c30cec73c044b41e3458cd991f94374039f7
|
sha256: 6d52cf833ff1af27bb5e986870a2c30cec73c044b41e3458cd991f94374039f7
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
||||||
- version: 5.36.0
|
- version: 5.36.0
|
||||||
sha256: 0f386dccbee8e26286404b2cca144e1005be65477979beb9b1ba272d4819bcf0
|
sha256: 0f386dccbee8e26286404b2cca144e1005be65477979beb9b1ba272d4819bcf0
|
||||||
run_tests: no
|
run_tests: no
|
||||||
type: xz
|
type: xz
|
||||||
debian_release:
|
debian_release:
|
||||||
- bookworm
|
- bookworm-backports
|
||||||
- bullseye
|
- bullseye-backports
|
||||||
|
|
110
generate.pl
110
generate.pl
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
use 5.014;
|
use 5.030;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use YAML::XS ();
|
use YAML::XS ();
|
||||||
|
@ -36,45 +36,42 @@ Run "perldoc ./generate.pl" to read the complete documentation.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
my $docker_slim_run_install = <<'EOF';
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
bzip2 \
|
|
||||||
ca-certificates \
|
|
||||||
# cpio \
|
|
||||||
curl \
|
|
||||||
dpkg-dev \
|
|
||||||
# file \
|
|
||||||
gcc \
|
|
||||||
# g++ \
|
|
||||||
libbz2-dev \
|
|
||||||
libdb-dev \
|
|
||||||
libc6-dev \
|
|
||||||
libgdbm-dev \
|
|
||||||
liblzma-dev \
|
|
||||||
make \
|
|
||||||
netbase \
|
|
||||||
patch \
|
|
||||||
procps \
|
|
||||||
zlib1g-dev \
|
|
||||||
xz-utils
|
|
||||||
EOF
|
|
||||||
chomp $docker_slim_run_install;
|
|
||||||
|
|
||||||
my $docker_slim_run_purge = <<'EOF';
|
|
||||||
savedPackages="make netbase" \
|
|
||||||
&& apt-mark auto '.*' > /dev/null \
|
|
||||||
&& apt-mark manual $savedPackages \
|
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
|
||||||
&& rm -fr /var/cache/apt/* /var/lib/apt/lists/*
|
|
||||||
EOF
|
|
||||||
chomp $docker_slim_run_purge;
|
|
||||||
|
|
||||||
my $config = YAML::XS::Load path("config.yml")->slurp_utf8();
|
my $config = YAML::XS::Load path("config.yml")->slurp_utf8();
|
||||||
|
|
||||||
my $template = do {
|
my $template = <<~'EOF';
|
||||||
local $/;
|
FROM {{base_image}}:{{tag}}
|
||||||
<DATA>;
|
LABEL maintainer="Ryan Voots <simcop@cpan.org>"
|
||||||
};
|
|
||||||
|
COPY *.patch /usr/src/perl/
|
||||||
|
WORKDIR /usr/src/perl
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN curl -SL {{url}} -o perl-{{version}}.tar.{{type}} \
|
||||||
|
&& echo '{{sha256}} *perl-{{version}}.tar.{{type}}' | sha256sum -c - \
|
||||||
|
&& tar --strip-components=1 -xaf perl-{{version}}.tar.{{type}} -C /usr/src/perl \
|
||||||
|
&& rm perl-{{version}}.tar.{{type}} \
|
||||||
|
&& cat *.patch | patch -p1 \
|
||||||
|
&& echo 'print "1..0 # Skipped: Tests are invalid"' > /usr/src/perl/ext/GDBM_File/t/fatal.t \
|
||||||
|
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
|
||||||
|
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
|
||||||
|
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
|
||||||
|
&& ./Configure -Darchname="$gnuArch" "$archFlag" {{args}} {{extra_flags}} -des \
|
||||||
|
&& make -j$(nproc) \
|
||||||
|
&& {{test}} \
|
||||||
|
&& make install \
|
||||||
|
&& cd /usr/src \
|
||||||
|
&& curl -LO {{cpanm_dist_url}} \
|
||||||
|
&& echo '{{cpanm_dist_sha256}} *{{cpanm_dist_name}}.tar.gz' | sha256sum -c - \
|
||||||
|
&& tar -xzf {{cpanm_dist_name}}.tar.gz && cd {{cpanm_dist_name}} && perl bin/cpanm . && cd /root \
|
||||||
|
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/{{cpanm_dist_name}}* /tmp/*
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
CMD ["perl{{version}}","-de0"]
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
my %builds;
|
my %builds;
|
||||||
|
|
||||||
|
@ -161,7 +158,7 @@ for my $release (@{$config->{releases}}) {
|
||||||
|
|
||||||
$output =~ s/\{\{docker_slim_run_install\}\}/$docker_slim_run_install/mg;
|
$output =~ s/\{\{docker_slim_run_install\}\}/$docker_slim_run_install/mg;
|
||||||
$output =~ s/\{\{docker_slim_run_purge\}\}/$docker_slim_run_purge/mg;
|
$output =~ s/\{\{docker_slim_run_purge\}\}/$docker_slim_run_purge/mg;
|
||||||
$output =~ s/\{\{tag\}\}/$debian_release/mg;
|
$output =~ s/\{\{tag\}\}/$debian_release/mg;
|
||||||
|
|
||||||
my $dir = path(sprintf("output/perls/%i.%03i.%03i-%s-%s", ($release->{version} =~ /(\d+)\.(\d+)\.(\d+)/), $build, $debian_release));
|
my $dir = path(sprintf("output/perls/%i.%03i.%03i-%s-%s", ($release->{version} =~ /(\d+)\.(\d+)\.(\d+)/), $build, $debian_release));
|
||||||
$dir->mkdir();
|
$dir->mkdir();
|
||||||
|
@ -266,40 +263,3 @@ Default: C<yes>
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
__DATA__
|
|
||||||
FROM {{image}}:{{tag}}-backports
|
|
||||||
LABEL maintainer="Ryan Voots <simcop@cpan.org>"
|
|
||||||
|
|
||||||
COPY *.patch /usr/src/perl/
|
|
||||||
WORKDIR /usr/src/perl
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN perl -i.bak -pE '$x=$_; $x=~s|^deb |deb-src |g;$_.=$x' /etc/apt/sources.list \
|
|
||||||
&& apt update \
|
|
||||||
&& apt -yq full-upgrade \
|
|
||||||
&& apt -yq build-dep perl \
|
|
||||||
&& {{docker_slim_run_install}} \
|
|
||||||
&& curl -SL {{url}} -o perl-{{version}}.tar.{{type}} \
|
|
||||||
&& echo '{{sha256}} *perl-{{version}}.tar.{{type}}' | sha256sum -c - \
|
|
||||||
&& tar --strip-components=1 -xaf perl-{{version}}.tar.{{type}} -C /usr/src/perl \
|
|
||||||
&& rm perl-{{version}}.tar.{{type}} \
|
|
||||||
&& cat *.patch | patch -p1 \
|
|
||||||
&& echo 'print "1..0 # Skipped: Tests are invalid"' > /usr/src/perl/ext/GDBM_File/t/fatal.t \
|
|
||||||
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
|
|
||||||
&& archBits="$(dpkg-architecture --query DEB_BUILD_ARCH_BITS)" \
|
|
||||||
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \
|
|
||||||
&& ./Configure -Darchname="$gnuArch" "$archFlag" {{args}} {{extra_flags}} -des \
|
|
||||||
&& make -j$(nproc) \
|
|
||||||
&& {{test}} \
|
|
||||||
&& make install \
|
|
||||||
&& cd /usr/src \
|
|
||||||
&& curl -LO {{cpanm_dist_url}} \
|
|
||||||
&& echo '{{cpanm_dist_sha256}} *{{cpanm_dist_name}}.tar.gz' | sha256sum -c - \
|
|
||||||
&& tar -xzf {{cpanm_dist_name}}.tar.gz && cd {{cpanm_dist_name}} && perl bin/cpanm . && cd /root \
|
|
||||||
&& {{docker_slim_run_purge}} \
|
|
||||||
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/{{cpanm_dist_name}}* /tmp/*
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
CMD ["perl{{version}}","-de0"]
|
|
||||||
|
|
35
os-base/Dockerfile
Normal file
35
os-base/Dockerfile
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
ARG VERSION
|
||||||
|
FROM debian:$VERSION-backports
|
||||||
|
LABEL maintainer="Ryan Voots <simcop@cpan.org>"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN perl -i.bak -pE '$x=$_; $x=~s|^deb |deb-src |g;$_.=$x' /etc/apt/sources.list \
|
||||||
|
&& apt update \
|
||||||
|
&& apt -yq full-upgrade \
|
||||||
|
&& apt -yq build-dep perl \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
# cpio \
|
||||||
|
curl \
|
||||||
|
dpkg-dev \
|
||||||
|
# file \
|
||||||
|
gcc \
|
||||||
|
# g++ \
|
||||||
|
libbz2-dev \
|
||||||
|
libdb-dev \
|
||||||
|
libc6-dev \
|
||||||
|
libgdbm-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
make \
|
||||||
|
netbase \
|
||||||
|
patch \
|
||||||
|
procps \
|
||||||
|
zlib1g-dev \
|
||||||
|
xz-utils
|
||||||
|
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
|
&& rm -fr /var/cache/apt/* /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
Loading…
Add table
Reference in a new issue