简体   繁体   中英

Jfrog cli docker image is not persistent

While running jf cli as a docker container via using docker run releases-docker.jfrog.io/jfrog/jfrog-cli-full-v2-jf jf -v The container get exited, hence i am not able to configure.

JFrog CLI stores its configuration inside its home directory, named.jfrog on the local system. By default, the.jfrog directory is located under the user home directory. You have the option of changing the home directory location by setting the JFROG_CLI_HOME_DIR environment variable.

So if you'd like JFrog CLI to access the home directory from inside a container, you'll need to mount the container's JFrog CLI home directory to the directory on the host machine. You can do this using docker's volume feature, by adding the -v option to the command as follows:

docker run -v ~/.jfrog:/home/frogger/.jfrog releases-docker.jfrog.io/jfrog/jfrog-cli-full-v2-jf jf c show

In the above command, we're mapping the host machine's ~/.jfrog directory to the container's /home/frogger/.jfrog directory. The releases-docker.jfrog.io/jfrog/jfrog-cli-full-v2-jf container's user home is /home/frogger .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM