copy file from the solace cli

Options
ravi_spring
ravi_spring Unconfirmed, Member Posts: 1

Hi All ,

I am trying to copy certs file from my windows mechine to certs folder through docker cli. By using copy command is not working. Could you please provide me any answers

Comments

  • uherbst
    uherbst Member, Employee Posts: 121 Solace Employee
    Options

    just to understand your question in the right way: You're looking for a way to transport files to a broker that is deployed as a docker container. Right ?
    And you have access to the host where the container is deployed ?
    Then you have multiple options:
    1. On the cli (the old fashioned command line interface), you can do scp from any other ip address outside.
    ena
    copy scp://user@scphost/path/to/file certs/
    You have to use user/password, because you cant give your private ssh key anywhere.
    2. You can do scp/sftp from the outside to the cli (that's the same port as the "ssh to cli"-port). You have to use user/password, because the CLI cant configured to use private keys. Assuming 2222 is your ssh port for the docker container:
    scp -P 2222 certfile filetransferuser@dockerip:certs/
    3. you can use "docker cp" to copy files to the docker container
    4. If you have your volumes mounted both in your container AND on the host, you just can copy files directly there.

    Maybe we should post that as FAQ :-)
    Have fun.
    Uli

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee
    edited July 2020 #3
    Options

    Hi @ravi_spring, are you using "docker cp"? E.g.
    docker cp cert-file.pem [container id]:/usr/sw/jail/certs