Skip to content

Commit 2a7f77b

Browse files
authored
Merge pull request #3147 from SUSE/for-deploy-Tumbleweed
🤖: Update build recipes for Tumbleweed
2 parents 6180c0f + d080b9f commit 2a7f77b

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

nginx-image/Dockerfile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,20 @@
1919
#!BuildTag: opensuse/nginx:1.29
2020
#!BuildTag: opensuse/nginx:latest
2121

22-
FROM opensuse/tumbleweed:latest
22+
FROM opensuse/bci/bci-micro:latest AS target
23+
FROM opensuse/tumbleweed:latest AS builder
24+
COPY --from=target / /target
2325

2426
RUN set -euo pipefail; \
25-
zypper -n install --no-recommends gawk nginx findutils envsubst
27+
export PERMCTL_ALLOW_INSECURE_MODE_IF_NO_PROC=1; \
28+
zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends gawk nginx findutils envsubst
29+
# sanity check that the version from the tag is equal to the version of nginx that we expect
30+
RUN set -euo pipefail; \
31+
[ "$(rpm --root /target -q --qf '%{version}' nginx | \
32+
cut -d '.' -f -2)" = "1.29" ]
2633

2734
# cleanup logs and temporary files
28-
RUN set -euo pipefail; zypper -n clean -a; \
35+
RUN set -euo pipefail; zypper -n --installroot /target clean -a; \
2936
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}; \
3037
rm -rf {/target,}/run/*; \
3138
rm -f {/target,}/etc/{shadow-,group-,passwd-,.pwd.lock}; \
@@ -34,8 +41,9 @@ RUN set -euo pipefail; zypper -n clean -a; \
3441
command -v zypper >/dev/null 2>&1 || rm -f /var/lib/zypp/AutoInstalled
3542

3643
# set the day of last password change to empty
37-
RUN set -euo pipefail; sed -i 's/^\([^:]*:[^:]*:\)[^:]*\(:.*\)$/\1\2/' /etc/shadow
38-
44+
RUN set -euo pipefail; sed -i 's/^\([^:]*:[^:]*:\)[^:]*\(:.*\)$/\1\2/' /target/etc/shadow
45+
FROM opensuse/bci/bci-micro:latest
46+
COPY --from=builder /target /
3947
# Define labels according to https://en.opensuse.org/Building_derived_containers
4048
# labelprefix=org.opensuse.application.nginx
4149
LABEL org.opencontainers.image.title="openSUSE Tumbleweed NGINX"
@@ -55,15 +63,11 @@ LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%"
5563
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
5664
CMD ["nginx", "-g", "daemon off;"]
5765
EXPOSE 80/tcp
58-
# sanity check that the version from the tag is equal to the version of nginx that we expect
59-
RUN set -euo pipefail; \
60-
[ "$(rpm -q --qf '%{version}' nginx | \
61-
cut -d '.' -f -2)" = "1.29" ]
66+
6267
RUN set -euo pipefail; mkdir /docker-entrypoint.d
6368
COPY [1-3]0-*.sh /docker-entrypoint.d/
6469
COPY docker-entrypoint.sh /usr/local/bin
6570
COPY index.html /srv/www/htdocs/
6671
RUN set -euo pipefail; chmod +x /docker-entrypoint.d/*.sh /usr/local/bin/docker-entrypoint.sh
67-
RUN set -euo pipefail; install -d -o nginx -g nginx -m 750 /var/log/nginx; ln -sf /dev/stdout /var/log/nginx/access.log; ln -sf /dev/stderr /var/log/nginx/error.log
68-
72+
RUN set -euo pipefail; install -d -o nginx -g nginx -m 750 /var/log/nginx; ln -sf /dev/stdout /var/log/nginx/access.log; ln -sf /dev/stderr /var/log/nginx/error.log
6973
STOPSIGNAL SIGQUIT

nginx-image/nginx-image.changes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
-------------------------------------------------------------------
2+
Mon Nov 10 17:41:10 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
3+
4+
- switch to a multistage build using bci-micro
5+
16
-------------------------------------------------------------------
27
Mon Oct 20 12:53:40 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
38

0 commit comments

Comments
 (0)