Commit Graph

70 Commits

Author SHA1 Message Date
Michael Plump 3e56c7fd0f
chore: upgrade all the dependencies to their latest versions (#3454)
* chore: go get -u ./...

* chore: go mod tidy

* chore: go mod vendor

* chore: fix compilation for buildkit >= 0.15.0

* chore: upgrade to Go 1.24

* chore: upgrade the Debian container used in an integration test
2025-05-21 09:31:10 -04:00
Thomas L. Kjeldsen 18f3c35964
fix: upgrade the ca-certificates source to Debian 12 (#3450) 2025-04-28 09:09:34 -04:00
Aaron Prindle 65f8ec4caf
chore: update docker-credential-gcr to use v2 (#3026) 2024-02-26 10:54:32 -08:00
dependabot[bot] 87ef541189
chore(deps): bump golang from 1.21 to 1.22 in /deploy (#2997)
Bumps golang from 1.21 to 1.22.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-12 09:29:53 -08:00
dependabot[bot] 232c77de5d
chore(deps): bump golang from 1.20 to 1.21 in /deploy (#2682)
Bumps golang from 1.20 to 1.21.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-13 20:47:48 -07:00
Liam Newman 5cbc06369e
fix: install tools using go.mod for versioning (#2562)
* fix: install tools using go.mod for versioning

* Add helpful instructions for tool updates.

* Add comment

* Add boilerplate

* Update go.mod

* Gofmt feedback
2023-06-14 10:18:13 -07:00
Ferran Vidal 507fe00b42
Use a multistage image to remove all redundancies on Dockerfiles (#2547)
As all Kaniko variants should be upgraded at once, all following the same specifications, it is easier for maintainers to bump Go or other image dependencies in a single place.

On top of that, there were an issue building `ppc64le` images because of a semantic error on the if condition that checks the arch used.

Signed-off-by: Ferran Vidal <ferran.vidal.p@gmail.com>
2023-06-05 09:20:40 -07:00
Ferran Vidal f4dae004ef
Download docker-credential-gcr from release artifacts (#2540)
As described in #2539, using `go install` with a pinned hash version it installs `1.5.1` in all cases.
This seems to be an issue on the upstream project https://github.com/GoogleCloudPlatform/docker-credential-gcr and how go proxy deals with versions.

As a temporary solution, we download the compiled version from the release artifacts.

Closes #2539

Signed-off-by: Ferran Vidal <ferran.vidal.p@gmail.com>
2023-06-02 09:47:33 -07:00
Aaron Prindle f42831057b
chore(deps): update docker-credential-* binaries in kaniko images (#2531) 2023-05-30 10:24:15 -07:00
dependabot[bot] 197fbdd705
chore(deps): bump golang from 1.19 to 1.20 in /deploy (#2388)
Bumps golang from 1.19 to 1.20.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-18 15:59:59 -07:00
Viacheslav Artamonov 86a73c5439
Update ACR credential helper to enable Azure Workload Identity (#2431)
* Bump the version of ACR credential helper to enable Azure Workload Identity

* Bump ACR credential helper version in go.mod

* remove garbage

* Update vendor
2023-03-22 12:25:54 -04:00
dependabot[bot] fe2413e6e3
chore(deps): bump golang from 1.17 to 1.19 in /deploy (#2328) 2022-12-23 11:48:03 -05:00
Lukas 8710ce3311
fix(Dockerfile): use temporary busybox mount to create /kaniko directory (#2155)
* ci(minikube): always install latest binary and run as root

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: remove docker unmask because minikube handles this

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* debug: view run folder and user ids

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* debug: log minikube if start fails

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* debug: start cri-docker before starting minikube cluster

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* Revert "debug: start cri-docker before starting minikube cluster"

This reverts commit 8923941358.

* debug: include verbose minikube output

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(minikube): cri-dockerd move command

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(minikube): copy minikube profile from root to user

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(minikube): change dirs to $HOME directory in config.json

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(minikube): enable registry on start

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: run as non root

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* cleanup

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* docs(minikube-script): update

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* deploy: create kaniko.tar

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* deploy: create kaniko folder in dockerfiles with 777 permissions via mount

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(Dockerfile): remove ARG

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* docs(Dockerfile): add comment to kaniko dir creation

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(Dockerfile): mount whole busybox image

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(Dockerfile): use musl busybox

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(Dockerfile): use musl busybox in debug image

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* typo

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>
2022-07-08 09:34:31 -04:00
claudex 3fd30ead0c
Fix the /kaniko directory permissions in container (#2009)
* Fix the /kaniko directory permissions in container

Create /kaniko directory with world permission to allow the creation of
sub directories by any user when the executor is run as non root. This
can lower the security but shouldn't have any impact in a container.

The tar unpack is the only way I found to have a directory with specific
permission as the image is created from "scratch" which doesn't have any
tool to change the permission otherwise.

Fixes #1363

* Avoid blackbox tar file creation

Use the Makefile to create the tar file use to create kaniko directory
in scratch container. This avoid having a "blackbox" binary file with
the empty directory.
2022-06-27 16:45:52 -04:00
Konstantin Demin 18f745de5b
CA certificates tasks in kaniko images (#2142)
* deploy: avoid duplicate certificates in images

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>

* deploy: use current stable Debian release image

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
2022-06-21 14:28:11 -04:00
Jason Hall d587122a9d
Run GitHub Actions on pushes and PRs to main, not master (#1883)
* Run GitHub Actions on pushes and PRs to main, not master

* fix go install ecr-login, bump to latest v0.6.0

* master -> main in some integration tests

* skip no-ref integration test
2022-01-14 14:54:12 -05:00
Jason Hall 0f986a423f
Bump AWS ecr-login cred helper to v0.5.0 (#1880) 2022-01-14 10:07:14 -06:00
ankitm123 e62c80ed19
fix: change the name of the acr cred helper (#1865)
Signed-off-by: ankitm123 <ankitmohapatra123@gmail.com>
2021-12-29 08:28:32 -05:00
Jason Hall b1b6962726
Share the Go build cache when building in Dockerfiles (#1853)
On my machine this makes image rebuilds go from ~5m to 1.5s.

This also required setting DOCKER_BUILDKIT=1 in integration test image
builds.

I also took the opportunity to bump the Go version used in those tests
to Go 1.17 to match the image build processes, and tidied up the
workflow files a bit too (renaming for consistency, typos, whitespace,
etc.)
2021-12-22 12:43:12 -05:00
Jason Hall f694212385
Use golang:1.17 and build from reproducible source (#1848)
* cleanup: Correctly use buildx TARGETARCH

* undo changes to Go version

* Use golang:1.17 and build from reproducible source

This change updates the Go version used to build kaniko and credential
helpers to Go 1.17, which uses Go modules by default. This means that we
can build outside of $GOPATH, from source fetched from the Go module
proxy.

This change also simplfies our builds of credential helpers to simply
`go install` them at a pinned version, for reproducibility and
simplicity.

This also changes `make images` and `make push` to build and push the
slim executor image as well.
2021-12-20 22:01:37 -05:00
Tejal Desai 3b42fe45ea
chore: add release workflow on pr (#1785)
* chore: add release workflow on pr

* remove linux/s390x

* use keys

* set up platforms

* cancel

* update keys

* add secrets to env

* All platforms added for kaniko

Co-authored-by: Kun-Lu <kun.lu@ibm.com>

* echi

* add mt 1300, remove push

* Remove

* final change

* break executor and executor-slim

Co-authored-by: Kun-Lu <kun.lu@ibm.com>
2021-10-19 18:58:02 -07:00
Tejal Desai 1c705f3541
bring them back (#1783) 2021-10-19 13:01:40 -07:00
Tejal Desai 4e8aae7c06
Revert ppce4 and other unintentional changes (#1781)
* Revert "fix dockefiles for deploy"

This reverts commit 63613adb82.

* revert unintentional test changes
2021-10-19 12:40:14 -07:00
Tejal Desai cf4822c31c
Run docker_credentials_gcr in warmer (#1780)
* run docker_credentials_gcr in warmer

* fix tests

* fix dockerfiles

* fix boilerplate

* mend

* fix

* another lint
2021-10-19 12:25:42 -07:00
Tejal Desai 21bb75717c
fix dockefiles for deploy gcr binsry (#1776) 2021-10-19 02:16:40 -07:00
Tejal Desai 63788dba63
fix dockefiles for deploy (#1774) 2021-10-19 01:50:44 -07:00
Tejal Desai a67ba0af65
fix dockefiles for deploy (#1773) 2021-10-19 01:30:35 -07:00
Tejal Desai badd66506d
Add s390x support to docker images (#1769)
1. add s390x support to docker images `executor`, `executor(slim)`,
   `executor(debug)` and `warmer`. Fixes #1462 and #1665.

2. Address the building issue of dependency `docker-credential-gcr`
   in Dockerfiles. This issue was introduced when recent commits
   in `docker-credential-gcr` removed the Makefile.

Signed-off-by: Kun-Lu <kun.lu@ibm.com>

Co-authored-by: Kun-Lu <kun.lu@ibm.com>
2021-10-19 00:01:47 -07:00
priyawadhwa 03a9847ab5
Fix executor Dockerfile, which wasn't building (#1741)
The Makefile from the `docker-credential-gcr` repo was removed, so all builds were failing. This PR removes the `make` command and pins `docker-credential-gcr` to a specific commit so that this doesn't happen again.
2021-10-18 11:44:05 -07:00
Sascha Schwarze 2d4db8e0ec
Use up-to-date ca-certificates during build (#1580) 2021-02-22 21:25:00 -08:00
Tejal Desai fc93da2f26
Fix release pipeline (#1561)
* fix debug cloud build

* fix cloudbuild release

* add workflow

* fix release

* use push action

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* add

* add parallel steps

* add parallel steps

* fix pathc

* fix dockerfile

* fix dockerfile

* add executor

* deploy

* test
2021-02-08 09:59:16 -08:00
Tejal Desai ffd35dbe12
Mutli-arch support (#1531)
* initial commit

* remove bazel jobs

* fix arch

* more fixes after testing and code review comments

* fix build platform

* add individual cloudbuild.yaml as its taking 45 mins for a cloud build trigger

* add buildx plugin

* add more debugging

* update busybox version to fix CVE-2018-1000500

* fix

* lint + more debug

* fix

* fix

* fix

* remove images from cloudbiuld

* move CI job back to docker

* one more fix

* lets see

* bring it back

* move CI job back to docker

* remove aerg from top

* live restart config

* remove live restore as minikube setup failed

* add --force-systemd

* add --force-systemd and docker driver none

* change the --run flag

* docker info and some logs removed

* fix docker command

* upgrade version for buildx to 0.5.1

* remove docker service from travis.yml and add systemd cgroup config

* move the docker config up

* move them back to docker build

* fix

* fix all dockerfiles

* fix warmer

* fix

* rm bazel jobs

* add more logs

* fix debug

Co-authored-by: ankitm123 <ankitmohapatra123@gmail.com>
2021-01-25 17:49:19 -08:00
bahetiamit 6cffb679aa
Adding multiarch image support (#1474) 2020-12-21 10:11:13 -08:00
Chris Mellard b106aa9a1b
feat: Added in docker cred helper for Azure Container Registry sourcing auth tokens directly from environment (#1453) 2020-10-16 13:51:13 -07:00
Tejal Desai 0c386e3f4a
fix docker-credential-gcr helper being called for multiple registries (#1439)
* fix multiple registryies docker-credential-gcr

* Update pkg/executor/push.go
2020-09-30 16:43:16 -07:00
Pierre-Louis Bonicoli 80a4a59a27
executor image: fix USER environment variable 2020-07-29 16:38:32 +02:00
Alex Szakaly 97e5042fbb
Fix docker-credential-gcr owner and group id
During image build we extract archives as root which is
capable to preserve owner and group.

With option `--no-same-owner` we drop all the user and
group information, defaults to current user (root).

To avoid future issues: add option above to all tar
execution.

Fixes #1303

Signed-off-by: Alex Szakaly <alex.szakaly@gmail.com>
2020-06-09 09:58:22 +02:00
Thomas Strömberg 885c4daba7
Merge pull request #1251 from yw-liu/master
Add /etc/nsswitch.conf for /etc/hosts name resolution
2020-05-20 09:03:33 -07:00
yw-liu c91d46e75f add nsswitch.conf 2020-05-20 21:32:43 +08:00
Chris Sng ec770e207d
Update docker-credentials-gcr to support auth with GCP Artifact Registry 2020-05-08 12:44:44 +09:00
Daniel Marks f5a811779b Fixed directory creation - missed -p option. 2020-05-05 15:24:29 +02:00
Daniel Marks 9e7f8414d3 Moved directory creation to build container. 2020-05-05 12:11:29 +02:00
Daniel Marks 5b3afb447b Readded the /kaniko/.docker directory
This directory was implicitly removed with commit
8a020010b7 and breaks several peoples
builds as some examples and documentation expect the directory to exist.
2020-05-05 11:45:43 +02:00
Sam Stoelinga 1b662e7834
Merge pull request #1140 from samos123/fix-1122-public-gcr
Add ability to use public GCR repos without being authenticated
2020-03-24 10:31:58 -07:00
Tejal Desai d1cf3afdce
Merge pull request #1121 from carlossg/acr-help
Use the correct name for acr helper
2020-03-17 16:06:12 -07:00
Sam Stoelinga 8a020010b7 Add ability to use public GCR image
Kaniko by default used to configure the GCR credential helper however
this caused Kaniko to fail when trying to use a base image from a public
GCR image. This patch makes it possible to use public GCR images as base
image when using docker even when you're not authenticated to GCR.

Co-authored-by: Nate Williams <nate.williams@files.com>
2020-03-17 09:09:41 -07:00
Ben Einaudi 8b8be5c418 Migrate to golang 1.14
* Upgrade go.mod file

* Upgrade travis file

* Run rm -rf vendor && go mod tidy && go mod vendor to upgrade vendor/modules.txt according to golang 1.14

* Upgrade golangci-lint version
2020-03-15 10:20:43 +01:00
Carlos Sanchez 7d345f13d2 Use the correct name for acr helper
Add it to debug and warmer images too
2020-03-10 18:15:17 +01:00
Ben Einaudi b73c2c10c8 Allow user to provide registry certificate
Fixes #1100
Fixes #1101
2020-03-08 18:17:50 +01:00
Anthony Davies ed22afc19b Rebase fix for PR #646
I needed this for my arm64 k8s cluster. I have zero Go experience but
enough experience with other things to fix the rebase (I think!). This
patch is working fine on my cluster.
2020-01-20 13:43:45 +11:00