Package: buildah
Version: 1.19.3+dfsg1-2
Severity: important
Forwarded: https://github.com/containers/buildah/pull/2993
Tags: patch

Dear Maintainer,

This is a variation of #981849.

If you have the following Containerfile:

───────┬──────────────────────
       │ File: Containerfile
───────┼──────────────────────
   1   │ FROM debian
   2   │ ARG N
   3   │ RUN seq 1 ${N}
───────┴──────────────────────

Building it a second time will run everything again:

----------------8<----------------8<----------------8<-----------------
$ buildah bud --layers=true --build-arg=N=7
STEP 1: FROM debian
STEP 2: ARG N
--> Using cache c352def690165a2c9a87a59bee469509afcdedf4869d66ac1f100d04667f42ad
--> c352def6901
STEP 3: RUN seq 1 ${N}
1
2
3
4
5
6
7
--> Using cache eec66aa2b27ca0195ff64ab5d7d49081e20a1b62e04311bd64dcf875e1e39505
--> eec66aa2b27
eec66aa2b27ca0195ff64ab5d7d49081e20a1b62e04311bd64dcf875e1e39505
$ buildah bud --layers=true --build-arg=N=7
STEP 1: FROM debian
STEP 2: ARG N
--> Using cache c352def690165a2c9a87a59bee469509afcdedf4869d66ac1f100d04667f42ad
--> c352def6901
STEP 3: RUN seq 1 ${N}
1
2
3
4
5
6
7
--> Using cache eec66aa2b27ca0195ff64ab5d7d49081e20a1b62e04311bd64dcf875e1e39505
--> eec66aa2b27
eec66aa2b27ca0195ff64ab5d7d49081e20a1b62e04311bd64dcf875e1e39505
----------------8<----------------8<----------------8<-----------------

I have submitted a patch upstream (url in the pseudoheaders above) to
fix this, and it seems it will be included in 1.19.5. IMO a fix for this
should be included in bullseye because layer caching is a critical piece
of image building in the container space.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-3-amd64 (SMP w/4 CPU threads)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), 
LANGUAGE=pt_BR:pt:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages buildah depends on:
ii  golang-github-containers-common  0.33.1+ds1-3
ii  libc6                            2.31-9
ii  libdevmapper1.02.1               2:1.02.175-2
ii  libglib2.0-0                     2.66.6-2
ii  libgpgme11                       1.14.0-1+b2
ii  libostree-1-1                    2020.8-2
ii  libseccomp2                      2.5.1-1
ii  libselinux1                      3.1-3
ii  uidmap                           1:4.8.1-1

Versions of packages buildah recommends:
ii  crun            0.17+dfsg-1
ii  fuse-overlayfs  1.4.0-1
ii  runc            1.0.0~rc93+ds1-2

Versions of packages buildah suggests:
pn  containers-storage  <none>

-- no debconf information

Attachment: signature.asc
Description: PGP signature

Reply via email to