What is the best way to add the secrectless.yml file to the docker container?

Hello, I was wondering if there is a better way to provide the docker container with the secretless.yml file?
The following steps are how I was able to provide the docker container with the secretless.yml file. Is there a better way?

  1. docker pull cyberark/secretless-broker
  2. docker run [options for the container] -it cyberark/secretless-broker [options for secretless-broker]
    docker run --network host -it cyberark/secretless-broker -debug

Step 2 will fail to run the container create due to no secretless.yml file found, but will create a container

  1. docker ps -a
  2. identify the docker id of the container created
  3. place copy of sectetless.yml file in directory shared by host pc and docker engine default VM (c/Users)
  4. change the directory of the terminal to the shared directory (cd /c/Users)
  5. docker cp secretless.yml containerID:/secretless.yml
  6. docker start -ai containerID
  7. secretless broker runs and works.

Hi LouisLouisLouL:

Can you try copying the secretless.yml file to your current directlry, and running the docker run ... command with the volume mount option -v ./secretless.yml:/secretless.yml? e.g.:

docker run --network host -it -v ./secretless.yml:/secretless.yml cyberark/secretless-broker -debug

This option should map the secretless.yml in the currentl directory to the root path (’/’) in your container.

1 Like

I should have also mentioned, and I know this is outside the scope of your original question, but… one option you can consider at some point (if you haven’t looked into it already) would be to organize your container setup using Docker Compose. For an example, see:

One nice thing about Docker Compose is that it creates Docker “services” with names that you can use e.g. with curl on the command line (i.e. using the service name in place of a hostname). For an example of this, look at the embedded curl command using the app service here:

Thank you for the information, the command worked!!

Thank you for the suggestion on docker-compose, I’ll look into that. Thank you!!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.