Skip to content
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

Kaniko doesn't support symlinks in Dockerfile #3175

Open
Kifok opened this issue May 22, 2024 · 1 comment
Open

Kaniko doesn't support symlinks in Dockerfile #3175

Kifok opened this issue May 22, 2024 · 1 comment
Labels
area/symlinks differs-from-docker priority/p1 Basic need feature compatibility with docker build. we should be working on this next.

Comments

@Kifok
Copy link

Kifok commented May 22, 2024

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

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

  • Dockerfile
FROM nginxinc/nginx-unprivileged:alpine-slim

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

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
  • - [Yes ]
Please check if this error is seen when you use --cache flag
  • - [No ]
Please check if your dockerfile is a multistage dockerfile
  • - [Yes ]
@JeromeJu JeromeJu added area/symlinks differs-from-docker priority/p1 Basic need feature compatibility with docker build. we should be working on this next. labels May 22, 2024
@Kifok
Copy link
Author

Kifok commented May 27, 2024

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:

Screenshot 2024-05-27 at 15 29 20

Build command for gitlab:
/kaniko/executor --context ./ --destination ${IMAGE}:${IMAGE_TAG}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/symlinks differs-from-docker priority/p1 Basic need feature compatibility with docker build. we should be working on this next.
Projects
None yet
Development

No branches or pull requests

2 participants