Kaniko: standard_init_linux.go:211: exec user process caused "no such file or directory"

Created on 4 Mar 2020  路  12Comments  路  Source: GoogleContainerTools/kaniko

Running gcr.io/kaniko-project/executor:debug 17.1

I have a dockerfile that when i build locally runs fine, however when kaniko builds it, running it yields

standard_init_linux.go:211: exec user process caused "no such file or directory"

what would cause this?

1024 related?

arefile-extraction

Most helpful comment

Well I figured it out for me! Since I'm on Windows, I needed to change the line endings of firebase.bash to LF before submitting the community build to my project. More info here and here.

I created an issue for Firebase here: https://github.com/GoogleCloudPlatform/cloud-builders-community/issues/443

All 12 comments

only reverting to 0.15.0 lets me actually get working images

Having this issue as well using the kaniko builder in Google' Cloud Build. Would love to get some eyes on this as it has been a massive pain to debug.

facing same issue with version 17.1 but only when building images based on debian
version 18 fixed the issue in my case
thanks

@donnyv12 are you using the cache=true flag? If yes, please clear the artifact cache.

@bitsofinfo and @donnyv12 can you please provide some more context to help us debug your issue
e.g.

  • dockerfile?
  • cloudbuild.yaml

Thanks
Tejal

ping!

Hi @tejal29 sorry for the delay. I am using the cache=true flag and will try it without that.

The docker file is quite large, and is based on a centos image. I'll try clearing the cache and see if that solves it.

@donnyv12 - if you get a chance to provide a Dockerfile, I can probably help get to the bottom of this one.

My gut instinct: the programmed called via "RUN" requires libc, which Kaniko lacks. Second best guess is a PATH or architecture difference.

@bitsofinfo Can you please try this with latest v0.20.0 release and let us know if it still exists.

It looks like I'm running into a similar issue, and I have a repro that I can share:

This tree of my repo with this Dockerfile:

# Use nxgo/cli as the base image to do the build
FROM nxgo/cli as builder

# Create app directory
WORKDIR /workspace

# Copy package.json and the lock file
COPY package.json yarn.lock /workspace/

# Install app dependencies
RUN yarn

# Copy source files
COPY . .

# Build apps
RUN yarn build api

# This is the stage where the final production image is built
FROM gcr.io/distroless/base

# Copy over artifacts from builder image
COPY --from=builder /workspace/dist/apps/api /app

# Set environment variables
ENV PORT=3000
ENV HOST=0.0.0.0

# Expose default port
EXPOSE 3000

# Start server
CMD [ "/app" ]

I'm using the following commands:

make build
make run

I'm running into this issue too when using the Google Cloud Builders Community Firebase build step.

I don't have a Dockerfile, only a cloudbuild.yaml file that looks like this:

steps:
# Deploy
- name: 'gcr.io/<project-id>/firebase'
  args: ['deploy', '--project=<project-id>', '--only=hosting']

Where <project-id> is the id of my Google Cloud project.

I'm using this command locally with the latest version of gcloud on Windows: gcloud builds submit .

Happy to provide any additional information as needed.

EDIT: For what it's worth, I'm following the official Google tutorial for deploying to Firebase.

Well I figured it out for me! Since I'm on Windows, I needed to change the line endings of firebase.bash to LF before submitting the community build to my project. More info here and here.

I created an issue for Firebase here: https://github.com/GoogleCloudPlatform/cloud-builders-community/issues/443

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vvbogdanov87 picture vvbogdanov87  路  4Comments

maurorappa picture maurorappa  路  4Comments

HoiPangCHEUNG picture HoiPangCHEUNG  路  4Comments

fkorotkov picture fkorotkov  路  3Comments

tejal29 picture tejal29  路  4Comments