How to persist the config details of JFrog CLI in docker container

Amith Kumar Mutakari
2019-05-09 07:31


How to persist the config details of JFrog CLI which is installed with docker.

Affected Versions



Docker installation of JFrog CLI configuration is not persisted unless until we persist it explicitly.

For example docker run -it jfrog rt config

Artifactory server ID: art

Artifactory URL: http://<art-url>/artifactory

Access token (Leave blank for username and password/API key): 

User: admin

Password/API key: 

[Info] Encrypting password…

root@amith:/opt/artifactory-pro-5.4.6/bin# docker run -it jfrog rt c show

will not show any config details as the config container is dead.


We can persist the config details for JFrog CLI using docker as below.

/root/.jfrog is the default location in the Docker container for JFrog CLI.


docker run -it -v <mount location in your OS>:/root/.jfrog jfrog rt c art –url=“http://<ARTURL>:8081/artifactory” –apikey=“AKCp5ccayRyZcjXFKKfrsHJfBQ5sGjg2ogkgK2WMftZkSaH6qFkfAnoXDanwX2mH3kYSiDZpH”

For example :- docker run -it -v /Users/amith:/root/.jfrog jfrog rt c art –url=“http://amith-art:8081/artifactory” –apikey=“AKCp5ccayRyZcjXFKKfrsHJfBQ5sGjg2ogkgK2WMftZkSaH6qFkfAnoXDanwX2mH3kYSiDZpH”


After this when we run the below command we are able to see the Artifactory config details.


docker run -it -v /Users/amithkm:/root/.jfrog jfrog rt c show 

Server ID: art

Url: “http://amith-art:8081/artifactory”/

API key: “AKCp5ccayRyZcjXFKKfrsHJfBQ5sGjg2ogkgK2WMftZkSaH6qFkfAnoXDanwX2mH3kYSiDZpH”

Default: true