I am trying to run a docker image using the following code. But the container is exiting immediately after starting. I don't find -d params at creating container. how to do?
HostConfig hostConfig = new HostConfig();
DefaultDockerClientConfig.Builder…
I use Java to build a Docker image. The Dockerfile and code are ready. I can build an image successfully through CLI, such as:
docker build -t imgetest:1.0 .
My Dockerfile is:
FROM node:6.14.2
EXPOSE 8080
COPY server.js .
CMD [ "node", "server.js"…
I am using docker-java API to execute docker API in my project. I didn't find any suitable method which lists down docker CPU memory usage as
GET /v1.24/containers/redis1/stats HTTP/1.1 with the help of docker-java API
Dependency
compile group:…
I am trying to write java code to automate the docker commands that I execute. I am actually creating a mssql docker container and then want to restore a DB backup in that container. I am able to achieve this using docker commands but having trouble…
I'm creating a mariaDB container via docker run with -v pathToSQL:/docker-entrypoint-initdb.d/script.sql option via Java. I have no idea how to find out when the container is ready to be connected with my JDBC client. How can I find out when the…
I am just a beginner to Docker and was exploring the various features. I have successfully installed java inside docker
**OS version**:Windows Server 2016
PS C:\testing> docker version
Client:
Version: 17.03.1-ee-3
API version: 1.27
Go…
i have the following Java-Code that i want to convert to groovy:
String containerId = "545cdc81a969";
ExecCreateCmdResponse execCreateCmdResponse = dockerClient
.execCreateCmd(containerId)
.withAttachStdout(true)
.withCmd("sh", "-c",…
When running an ocrmypdf docker container, all I get is the following message:
ocrmypdf: error: unrecognized arguments: 64ee37a6fc66cf591ce4a35f-1.png_OCR.pdf
This is what my docker inspect container shows:
"Args": [
"ocrmypdf",
…
I am trying to create a Docker client with the Docker Java API, but I get a ClassNotFoundException when running my code. I am following this Baeldung guide,
but I am using the latest version of docker-java-api (version 3.3.3).
Maven…
Can the Docker Java client library (https://github.com/docker-java/docker-java) be used to execute custom commands?
I want to use the library to check if Docker images I need to download are compatible with multiple architectures (specifically,…
I am using azul/zulu-openjdk-distroless:17.0.6 image and want to execute the java command with parameters but it fails at the runtime
Here is my docker image:
FROM alpine:3.17.3 as build-env
ARG DATADOG_VERSION=1.8.3
RUN wget…
I'm trying to run this command in docker trough java, but i don't know why it only works when i execute the command in the host machine and not trough java (when execute on java it doesn't add or say nothing). i'm 99% sure problem are the ">>" of…
i'm using the java-docker client from here: https://github.com/docker-java/docker-java.
I trying to figure out how to set the stop timeout for the docker stop command.
So i'm using in java the method…
Here is my Dockerfile
FROM ubuntu:20.04
# Install java 8 with apt-get
RUN apt-get update -qq && apt-get install -yqq openjdk-8-jdk
# Install java 11 with sdkman
RUN apt-get install -yqq curl unzip zip
RUN curl -s "https://get.sdkman.io" | bash
RUN…
I want to ask how I use the withCmd method as follows:
commands = new String[]{"echo","test:111 | chpasswd"};
ExecCreateCmdResponse execCreateCmdResponse = dockerClient.execCreateCmd("b6b571d5469a")
…