Skip to content

Commit

Permalink
Bug 1901033 - image_builder: update kaniko and skopeo. r=glandium
Browse files Browse the repository at this point in the history
Adjust kaniko arguments passed in by build-image:
- pass --cache=true to kaniko, otherwise it seems to look for an image named
  "parent" on docker hub instead of looking at the tar we put in the cache dir
- pass a cache-repo to kaniko, otherwise it refuses to enable caching
  (GoogleContainerTools/kaniko#374)

Differential Revision: https://phabricator.services.mozilla.com/D213062
  • Loading branch information
jcristau committed Jun 13, 2024
1 parent 28076b1 commit 60f8683
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions taskcluster/docker/image_builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

FROM golang:1.14 as skopeo
FROM golang:1.22 as skopeo

WORKDIR /go/src/
COPY build-skopeo.sh /build-skopeo.sh
RUN /build-skopeo.sh

FROM golang:1.14 as kaniko
FROM golang:1.22 as kaniko
WORKDIR /go/src/
COPY build-kaniko.sh /build-kaniko.sh
RUN /build-kaniko.sh
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/docker/image_builder/build-image/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ fn build_image(
.args(&["--destination", "image"])
.args(&["--dockerfile", "Dockerfile"])
.arg("--no-push")
.args(&["--cache-dir", "/workspace/cache"])
.args(&["--cache=true", "--cache-dir", "/workspace/cache", "--cache-repo", "oci:/workspace/repo"])
.arg("--single-snapshot")
// FIXME: Generating reproducible layers currently causes OOM.
// .arg("--reproducible")
.arg("--whitelist-var-run=false")
.arg("--ignore-var-run=false")
.args(&["--tarPath", dest]);
if debug {
command.args(&["-v", "debug"]);
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/docker/image_builder/build-kaniko.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -ex

git clone --no-checkout --depth=1 --branch=v1.0.0 https://github.com/GoogleContainerTools/kaniko .
git checkout 146ec6a9cd6f87b4a12e8119ded575d5edca35ac
git clone --no-checkout --depth=1 --branch=v1.23.0 https://github.com/GoogleContainerTools/kaniko .
git checkout 98df8ebfc7834a720c83b81bd0b1d54f4f480477
make
4 changes: 2 additions & 2 deletions taskcluster/docker/image_builder/build-skopeo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -ex

git clone --no-checkout --depth=1 --branch=v1.1.1 https://github.com/containers/skopeo .
git checkout 67abbb3cefbdc876447583d5ea45e76bf441eba7
git clone --no-checkout --depth=1 --branch=v1.15.1 https://github.com/containers/skopeo .
git checkout e2ea426918973e5e007a5e1e2457a41ab336fc41
export GO111MODULE=on CGO_ENABLED=0

# Set unixTempDirForBigFiles so skopeo will extract in a directory hidden by kaniko
Expand Down

0 comments on commit 60f8683

Please sign in to comment.