Merge pull request #1 from drone/version_update

Updated kaniko base image to v1.3.0
This commit is contained in:
Shubham Agrawal 2020-11-24 12:07:33 +05:30 committed by GitHub
commit 0d853fd119
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 8 deletions

View File

@ -15,7 +15,8 @@ import (
)
const (
// Docker config file path
// Docker file path
dockerPath string = "/kaniko/.docker"
dockerConfigPath string = "/kaniko/.docker/config.json"
)
@ -129,10 +130,15 @@ func createDockerCfgFile(username, password, registry string) error {
return fmt.Errorf("Registry must be specified")
}
err := os.MkdirAll(dockerPath, 0600)
if err != nil {
return errors.Wrap(err, fmt.Sprintf("failed to create %s directory", dockerPath))
}
authBytes := []byte(fmt.Sprintf("%s:%s", username, password))
encodedString := base64.StdEncoding.EncodeToString(authBytes)
jsonBytes := []byte(fmt.Sprintf(`{"auths": {"%s": {"auth": "%s"}}}`, registry, encodedString))
err := ioutil.WriteFile(dockerConfigPath, jsonBytes, 0644)
err = ioutil.WriteFile(dockerConfigPath, jsonBytes, 0644)
if err != nil {
return errors.Wrap(err, "failed to create docker config file")
}

View File

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:debug-v0.19.0
FROM gcr.io/kaniko-project/executor:amd64-v1.3.0
ENV HOME /root
ENV USER root

View File

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:arm64-v0.19.0
FROM gcr.io/kaniko-project/executor:arm64-v1.3.0
ENV HOME /root
ENV USER root

View File

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:debug-v0.19.0
FROM gcr.io/kaniko-project/executor:amd64-v1.3.0
ENV HOME /root
ENV USER root

View File

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:arm64-v0.19.0
FROM gcr.io/kaniko-project/executor:arm64-v1.3.0
ENV HOME /root
ENV USER root

View File

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:debug-v0.19.0
FROM gcr.io/kaniko-project/executor:amd64-v1.3.0
ENV HOME /root
ENV USER root

View File

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:arm64-v0.19.0
FROM gcr.io/kaniko-project/executor:arm64-v1.3.0
ENV HOME /root
ENV USER root