I created the images locally and created one repository in DockerHub called testName/backend. The docker images command shows the created images. And I would like to run the container with a command in the format docker run yourImage:version. So according to this (so I think I should call such a command: dock…
Tag: dockerfile
how to set docker image name as a file name it creates while building
So i want to set the docker image name as a file it creates. the stages inside the dockerfile are: set new version for pom.xml, compile, package all using mvn. i want to set the docker image name as the artifact the build creates Example: my-app-1.0.1 Thanks! Answer So as Thorbjørn Ravn, Andersen and Max advi…
Create Docker Image with Custom JDK
I’m attempting to create a Docker image for my custom JDK install. It’s simply the Jetbrains Runtime with Hotswap agent added to it. I’m new to docker images and creating a source image like this seems to be extra difficult to find clear documentation. So far, I have this in my Dockerfile an…
Converting Shell Script to Dockerfile
I have Java app and want to generate docker image, I have shell script like this: And I try to convert it into Dockerfile like this It can be generated, but there’s an error when I try to run it like this: I’ve also changed this script RUN for rJarFile in `ls ${APPLICATION_DIR}/lib/*.jar`; do expo…
“b’OCI runtime create failed: container_linux.go:380?
Client Error: Bad Request (“b’OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “/usr/lib/jvm/java-8-openjdk-amd64/bin/java”: stat /usr/lib/jvm/java-8-openjdk-amd64/bin/java: no such file or directory: unknown’”) this my error ,I cannR…
Configure Hazelcast via external yml-file
I´ve a running hzc-yml configuration in classpath – the generated jar file works fine in a docker context. Now I want to load this yml-file externally. I added this startup-property to my DOCKERFILE: The whole DOCKERFILE looks like: It seems that the service wants to apply the external yml-file, but I a…
GitLab CI docker build – docker: not found – exit code 127
I’m trying to create a CI/CD Pipeline for a simple java/maven project. The runner that I’m using is a docker runner. I’m using a dockerfile to create a container which installs maven/java/etc.. and in this container the program should be tested. Sorry for the question but I am new to CI/CD P…
Docker multi-stage build fails if we use CMD in dockerfile
Dockerfile: The above docker build fails with the error: target folder does not exist The below dockerfile works perfectly: Just changing CMD to RUN fixed the issue. Why is this happening? I thought in the intermittent container, the cmd would execute which should make both the commands equivalent right? Answ…
How to add many SSL certificates for Java application inside docker?
I’m new in docker. I want to add several certificates for Java application inside Docker. I’m using this code in Dockerfile: and it works fine, but only for one certificate. How I can add all certificates from /files folder with one line command or in some cycle or maybe with bash file? UPDATED: I…
Installing and using Gradle in a docker image/container
I am getting this strange error at the end of the process of creating a docker image from a Dockerfile: The relevant part of the Dockerfile: The command I am using is: docker build -t java_i . The strange thing is that if: I run a container from the previous image commenting out RUN gradle test jar (command: …