5 Commits
0.2.0 ... 0.2.2

Author SHA1 Message Date
d652653cbe fix parentheses when parsing multiple arguments 2019-05-21 13:47:56 +02:00
ad1fd17aa5 Fix handling of long username/password
Apparently the busybox implementation of `base64` will line-wrap long output strings.
This meant that long username+password combinations could produce base64 that
contained spurious "\n" characters, which then led to:
```
2019/05/06 00:47:39 Unable to parse "/kaniko/.docker/config.json": invalid character '\n' in string literal
```

Fixed by just removing the newlines in base64 output.  A "better" solution would use a different base64
implementation that avoided line-wrapping in the first place.
2019-05-06 09:16:50 +02:00
4346dd607c fix user name in dockerfile 2019-01-09 09:39:14 +01:00
3cd65aba50 add support for dockerfile build target 2019-01-09 09:39:14 +01:00
0eb7c2716d change how to handle the cache setting 2019-01-09 09:39:14 +01:00
2 changed files with 14 additions and 9 deletions

View File

@ -1,7 +1,7 @@
FROM gcr.io/kaniko-project/executor:debug-v0.7.0
ENV HOME /root
ENV USER /root
ENV USER root
ENV SSL_CERT_DIR=/kaniko/ssl/certs
ENV DOCKER_CONFIG /kaniko/.docker/
ENV DOCKER_CREDENTIAL_GCR_CONFIG /kaniko/.config/gcloud/docker_credential_gcr_config.json

View File

@ -4,7 +4,7 @@ set -euo pipefail
export PATH=$PATH:/kaniko/
DOCKER_AUTH=`echo -n "${PLUGIN_USERNAME}:${PLUGIN_PASSWORD}" | base64`
DOCKER_AUTH=`echo -n "${PLUGIN_USERNAME}:${PLUGIN_PASSWORD}" | base64 | tr -d "\n"`
REGISTRY=${PLUGIN_REGISTRY:-https://index.docker.io/v1/}
@ -21,16 +21,20 @@ DOCKERJSON
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
LOG=${PLUGIN_LOG:-info}
case "${PLUGIN_CACHE:-}" in
true) CACHE="true" ;;
*) CACHE="false" ;;
esac
if [[ -n "${PLUGIN_BUILD_ARGS:-}" ]]; then
if [[ -n "${PLUGIN_TARGET:-}" ]]; then
TARGET="--target=${PLUGIN_TARGET}"
fi
if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
CACHE="--cache=true"
fi
if [ -n "${PLUGIN_BUILD_ARGS:-}" ]; then
BUILD_ARGS=$(echo "${PLUGIN_BUILD_ARGS}" | tr ',' '\n' | while read build_arg; do echo "--build-arg=${build_arg}"; done)
fi
if [[ -n "${PLUGIN_TAGS:-}" ]]; then
if [ -n "${PLUGIN_TAGS:-}" ]; then
DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${PLUGIN_REPO}:${tag} "; done)
else
DESTINATIONS="--destination=${PLUGIN_REPO}:latest"
@ -39,6 +43,7 @@ fi
/kaniko/executor -v ${LOG} \
--context=${CONTEXT} \
--dockerfile=${DOCKERFILE} \
--cache=${CACHE} \
${DESTINATIONS} \
${CACHE:-} \
${TARGET:-} \
${BUILD_ARGS:-}