Reputation: 725
My Problem is the following:
If i type this in the command console, it works:
docker build -f src/main/docker/Dockerfile.jvm -t hello . & docker run --name hello --rm -p 8080:8080 hello
But if i try to use it with the "Run-Option" in IntelliJ, it doesnt work.
My command above has 9 Steps like the IntelliJ one, but it seems that the 5th fails. Here is the config:
Here the output from the failed build:
It doesnt even create the Image-Tag like my manual command does.
And last but not least here is the Dockerfile:
FROM fabric8/java-alpine-openjdk11-jre:latest
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV AB_ENABLED=jmx_exporter
# Be prepared for running in OpenShift too
RUN adduser -G root --no-create-home --disabled-password 1001 \
&& chown -R 1001 /deployments \
&& chmod -R "g+rwX" /deployments \
&& chown -R 1001:root /deployments
COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/app.jar
EXPOSE 8080
# run with user 1001
USER 1001
ENTRYPOINT [ "/deployments/run-java.sh" ]
Where is the key Difference? I can stick with the manual one, but the Run-Config would be smoother
Upvotes: 0
Views: 3809
Reputation: 826
There are only 3 files in your build context. It seems weird. You might want to specify the "Context folder" option
Upvotes: 1