Kaniko / Elixir Issue

599 views
Skip to first unread message

joel....@gmail.com

unread,
Jul 12, 2018, 1:47:30 PM7/12/18
to kaniko-users
I'm attempting to use Kaniko to build an elixir container. Unfortunately it's failing on the command:

RUN mix local.hex --force

Here's the Dockerfile (a simplified version for debugging):
#===================
# Build Stage
#===================
FROM elixir
:1.6.6-alpine as builder


# Building a container means targeting prod
ENV MIX_ENV
=prod

# Install local hex and rebar3

RUN whoami
RUN ls
-la /root/
RUN MIX_DEBUG
=1 mix local.hex --force
RUN ls
-la /root/
RUN mix
local.rebar --force


Here's the skaffold.yaml:
apiVersion: skaffold/v1alpha2
kind
: Config
build
:
  artifacts
:
 
- imageName: gcr.io/XXXXXXXXXXX/kaniko-test
    workspace
: .
  kaniko
:
    gcsBucket
: XXXXXXXXXXX-kaniko
    pullSecretName
: kaniko-secret
   
namespace: jx
deploy
:
  kubectl
:
    manifests
:


Here's the output around the error message:

[kanikojffxh kaniko] time="2018-07-12T17:45:21Z" level=info msg="cmd: /bin/sh"

[kanikojffxh kaniko] time="2018-07-12T17:45:21Z" level=info msg="args: [-c whoami]"

[kanikojffxh kaniko] root

[kanikojffxh kaniko] time="2018-07-12T17:45:21Z" level=info msg="Taking snapshot of full filesystem..."

[kanikojffxh kaniko] time="2018-07-12T17:45:27Z" level=info msg="No files were changed, appending empty layer to config."

[kanikojffxh kaniko] time="2018-07-12T17:45:27Z" level=info msg="cmd: /bin/sh"

[kanikojffxh kaniko] time="2018-07-12T17:45:27Z" level=info msg="args: [-c ls -la /root/]"

[kanikojffxh kaniko] total 12

[kanikojffxh kaniko] drwx------    1 root     root          4096 May 17 17:01 .

[kanikojffxh kaniko] drwxr-xr-x    1 root     root          4096 Jul 12 17:45 ..

[kanikojffxh kaniko] drwxr-xr-x    2 root     root          4096 May 17 17:01 .docker

[kanikojffxh kaniko] time="2018-07-12T17:45:27Z" level=info msg="Taking snapshot of full filesystem..."

[kanikojffxh kaniko] time="2018-07-12T17:45:30Z" level=info msg="No files were changed, appending empty layer to config."

[kanikojffxh kaniko] time="2018-07-12T17:45:30Z" level=info msg="cmd: /bin/sh"

[kanikojffxh kaniko] time="2018-07-12T17:45:30Z" level=info msg="args: [-c MIX_DEBUG=1 mix local.hex --force]"

[kanikojffxh kaniko] time="2018-07-12T17:45:30Z" level=error msg="exit status 1"

FATA[0035] build step: kaniko build for [gcr.io/ox-dev-joel/kaniko-test]: waiting for pod to complete: pod already in terminal phase: Failed 



I get the same problem running inside the skaffold debug executor:

INFO[0026] cmd: /bin/sh

INFO[0026] args: [-c whoami]

root

INFO[0026] Taking snapshot of full filesystem...

INFO[0030] cmd: /bin/sh

INFO[0030] args: [-c ls -la /root/]

total 24

drwxr-xr-x    8 root     root           256 Jul 12 17:23 .

drwxr-xr-x    1 root     root          4096 Jul 12 17:23 ..

-rw-------    1 root     root           557 Jul 12 17:22 .ash_history

drwxr-xr-x    3 root     root            96 Jul 12 17:05 .mix

-rw-r--r--    1 root     root           398 Jul 12 17:22 Dockerfile

-rwxr-xr-x    1 root     root            86 Jul 12 17:04 build

-rwxr-xr-x    1 root     root           154 Jul 12 16:50 install_hex_rebar.sh

-rw-r--r--    1 root     root           315 Jul 12 16:24 skaffold.yaml

INFO[0030] Taking snapshot of full filesystem...

INFO[0031] No files were changed, appending empty layer to config.

INFO[0031] cmd: /bin/sh

INFO[0031] args: [-c MIX_DEBUG=1 mix local.hex --force]

ERRO[0032] exit status 1


But executing the command manually inside the debug executor works:

/ # /bin/sh -c "MIX_DEBUG=1 mix local.hex --force"

** Running mix loadconfig

** Running mix local.hex --force

* creating root/.mix/archives/hex-0.18.1

/ #


Any thoughts?

Thanks,
Joel

Dan Lorenc

unread,
Jul 12, 2018, 5:43:25 PM7/12/18
to joel....@gmail.com, kaniko-users
Thanks for opening the issue on Github, we can debug there. 

Dan Lorenc

--
You received this message because you are subscribed to the Google Groups "kaniko-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaniko-users...@googlegroups.com.
To post to this group, send email to kaniko...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaniko-users/e05927bb-cfdc-40d1-bb22-3de58f7ebaab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages