Open Kifok opened 1 month ago
Adding more information, this is build command i've used to build docker image
docker run \ -v $PWD:/build \ gcr.io/kaniko-project/executor:debug \ --dockerfile=Dockerfile \ --tar-path /build/image.tar \ --no-push \ --context /build \ --destination myimage:1.2
Also if i build via gitlab-ci i get this kind of error:
Build command for gitlab:
/kaniko/executor --context ./ --destination ${IMAGE}:${IMAGE_TAG}
I think I'm missing some context on your issue. Which file exactly is a symlink in your container? I don't see any ln
calls or anything else to indicate that there even is a symlink involved.
I'm facing a possibly related issue, I'm getting error building image: could not save file: copying ownership: chown /kaniko/1/<path>: no such file or directory
which I suspect might be due to some symlink pointing to a non-existent file. I have confirmed that the file doesn't exist and doesn't need to exist.
Actual behavior I've found out that kaniko doesn't support symlinks it's make issues like on screenshot below.![telegram-cloud-document-2-5341563474990353752](https://github.com/GoogleContainerTools/kaniko/assets/39341222/9cab841a-fa28-408c-b405-9bf8addca050)
Expected behavior In my approach, we need to build docker images without any changes in Dockerfile
To Reproduce Steps to reproduce the behavior: You should create dockerfile with symlinks like below
Additional Information
COPY --from=builder /app/dist /usr/share/nginx/html RUN rm /etc/nginx/conf.d/default.conf COPY ./nginx.conf /etc/nginx/conf.d
RUN chown -R nginx:nginx /var/cache/nginx && \ chown -R nginx:nginx /var/log/nginx && \ chown -R nginx:nginx /etc/nginx/conf.d && \ touch /var/run/nginx.pid && \ chown -R nginx:nginx /var/run/nginx.pid