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

Fails for a multi-stage docker build #1126

Open
Kushank24 opened this issue Oct 6, 2023 · 0 comments
Open

Fails for a multi-stage docker build #1126

Kushank24 opened this issue Oct 6, 2023 · 0 comments

Comments

@Kushank24
Copy link

Kushank24 commented Oct 6, 2023

Is your feature request related to a problem? Please describe.
I tried to use dockerfile-image-update on a multi-stage build. The dockerfile I used was:

FROM openjdk:11 AS build
WORKDIR /app
COPY ./src ./src
RUN javac ./src/Main.java
FROM openjdk:11-jre-slim
WORKDIR /app
COPY --from=build /app/src/Main.class ./Main.class
CMD ["java", "Main"]

Now, when I ran the dockerfile-image update, it changed the jre also but that was not inteneded.
Describe the solution you'd like
The solution I suggest is to only look for base image instead of scanning the complete Dockerfile.

Additional context
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant