ARG base_image
FROM ${base_image}
ARG some_arg
RUN echo ${some_arg} > /opt/arg.txt
ARG build_id=0
RUN echo ${build_id}
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
fails to be processed
docker run \
> -e LOGGING_LEVEL=debug \
> -e LOGGING_FORMAT=color \
> -e base_image="ubtuntu:bionic" \
> -e DOCKER_FILE_NAME=Dockerfile1 \
> -v $(pwd)/workspace:/workspace \
> -v $(pwd)/cache:/cache \
> -it kaniko-app
Env var DEBUG:
INFO[0000] Starting the Kaniko application to process a Dockerfile ...
INFO[0000] Initialize the BuildPackConfig and set the defaults values ...
DEBU[0000] Checking if the DOCKER_FILE_NAME env is defined...
DEBU[0000] DOCKER_FILE_NAME=Dockerfile1
DEBU[0000] DockerfileName is: Dockerfile1
DEBU[0000] KanikoOptions defined
INFO[0000] Kaniko dir: /kaniko
INFO[0000] Workspace dir: /workspace
INFO[0000] Cache dir: /cache
INFO[0000] Dockerfile name: Dockerfile1
DEBU[0000] Building the Dockerfile1
DEBU[0000] Moving to kaniko home dir: /kaniko
DEBU[0000] Building the Dockerfile1 ...
DEBU[0000] Built stage name to index map: map[]
as kaniko CalculateDependencies reports a panic: runtime error: index out of range [0] with length 0
Issue
The following Dockerfile
fails to be processed
as kaniko
CalculateDependencies
reports apanic: runtime error: index out of range [0] with length 0
Stacktrace