-
Notifications
You must be signed in to change notification settings - Fork 83
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
Warning at multistage build #100
Comments
@AuthorProxy This warning appears because you don't specify the tag on the FROM node:8.4.0-slim as clientbuilder
WORKDIR /app
COPY src/main/frontend .
RUN yarn
RUN npm run build
FROM openjdk:8u141-jdk-slim as serverbuilder
WORKDIR /app
COPY . .
COPY --from=clientbuilder /app/dist /app/src/main/resources/static
RUN ./gradlew build
FROM openjdk:8-jre-alpine
ENV artifact app-0.0.1.jar
WORKDIR /app
COPY --from=serverbuilder /app/build/libs/${artifact} /app
EXPOSE 8080
ENTRYPOINT ["sh", "-c"]
CMD ["java -jar ${artifact}"] In this case, the warning that appears are:
This is expected since there is no multistage support. |
Found this issue after discovering there's no multistage support. For anyone that needs such a thing, consider the alternative linter hadolint. |
@darkvertex Thanks!. The multistage Dockerfile I used as an example before shows no warnings on the online version of hadolint. |
There are two online checkers using this tool:
But the other problem: |
@SimonHeimberg I checked the Dockerfile posted by @AuthorProxy and the one I posted as an example in http://www.dockerfilelint.com and noticed that the line
The bug could be summarized into: When reusing stages with the |
@AmauryOrtega Thanks for this nice summary. I can confirm your findings. |
Gives next warnings dockerfilelint:
15:1 warning dockerfilelint: Clarity Base images should specify a tag to use.
21:1 warning dockerfilelint: Clarity Base images should specify a tag to use.
26:1 warning dockerfilelint: Clarity Base images should specify a tag to use.
Where should I put this tag?
The text was updated successfully, but these errors were encountered: