-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running kaniko from inside a container doesn't seem to work #268
Comments
+1 on this. Everything after 6fe9ea4 is completely broken. The only difference from the failing log below and the successful one is the commit kaniko was built from. 6fe9ea4
8cad6d0
|
I was able to just build the first example dockerfile fine at head. I stuck the Dockerfile and main.go into a folder named foo: $ ls foo
Dockerfile main.go
$ cat foo/Dockerfile
FROM golang:1.10.3-alpine AS build
ADD . /src
RUN cd /src && go build -o app
FROM alpine
WORKDIR /app
COPY --from=build /src/app /app/
CMD [ "./app" ]
$ cat foo/main.go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
} Then ran: /run_in_docker.sh Dockerfile $(pwd)/foo $IMG From the root of kaniko and everything worked. Do you have any other repro instructions? @Delphinator can you share the Dockerfile you used? |
@dlorenc Are you sure your local
I used the following Dockerfile, although I so far had all Dockerfile I've tried fail.
|
Yeah I'm trying to repro but having trouble. I built from head with: $ docker rmi -f gcr.io/kaniko-project/executor
$ make images The image appears to have been rebuilt correctly, and exists in my daemon: $ docker images | grep kaniko
gcr.io/kaniko-project/executor latest 4779434dffc1 39 seconds ago 53.6MB Then run_in_docker works with your Dockerfile: $ ./run_in_docker.sh Dockerfile $(pwd)/foo $IMG I've also done it with the image currently at latest, by removing it from my local daemon cache and doing run_in_docker again. |
@Delphinator I did find a bug when building your Dockerfile (PR #270), but I was still able to build it successfully. |
@dlorenc the way you describe works for me as well, since the P.s. Not sure if I did understand your point correctly. |
Ah, ok! That helps. I missed that difference in execution. There might be a difference in the way process groups are handled inside the busybox sh binary vs. when docker executes the executor directly. |
There is definitely a difference. Just did a few experiments starting the executor in different ways and only some failed. I used the files from @dlorenc above, but I don't think the exact Dockerfile used makes any difference.
working invocations
failing invocation
|
HI.
I have the following problem:
I'm unable to build my Dockerfile with kaniko from inside the kaniko container.
Stops at with following line and raising 0 errors
Doing the same without using
/busybox/sh
does work$ docker run --rm -it --entrypoint="/kaniko/executor" -v $PWD:/workspace gcr.io/kaniko-project/executor:debug -d test.hub
The contents of the
Dockerfile
andapp.go
.The text was updated successfully, but these errors were encountered: