0

I am looking for a class to access the files from the running container using the arquillian cube.

eg: docker_ubuntu running has files \usr\share\config.json

I want to update the config.json file using the arquillian cube.

Note : I am aware of working thru docker exec commands.

Raj Asapu
  • 436
  • 5
  • 11

1 Answers1

0

I found the solution

 dockerClient = DockerClientBuilder.getInstance().build();
    dockerClient.copyArchiveToContainerCmd(getContainerIdUsingName("ui")).withRemotePath("/usr/share/nginx/html/config").withHostResource(hostConfigPath.getAbsolutePath()).withNoOverwriteDirNonDir(false).exec();
    System.out.println("Copying");

Method to get the container Id - Required docker-java
 public String getContainerIdUsingName(String containerName)
    {
        InspectContainerResponse containerInfo = dockerClient.inspectContainerCmd(containerName).exec();
        return containerInfo.getId();
    }
Raj Asapu
  • 436
  • 5
  • 11