JFrog安装

JFrog安装

下载安装

1. 前置权限

sudo mkdir -p /app/jfrog/etc 
cd /app/jfrog/etc
sudo touch ./system.yaml
sudo chown -R 1030:1030 /app/jfrog

容器所使用用户为1030组权限的普通用户artifactory
此处直接将归属修改为1030即可


2. 拉取镜像

docker pull releases-docker.jfrog.io/jfrog/artifactory-pro:7.33.9

3. 容器运行

docker run \
	-d \
	-e TZ=Asia/Shanghai \
	-v /etc/localtime:/etc/localtime \
	--restart always \
	--name artifactory \
	-p 8081:8081 \
	-p 80:8082 \
	-v /app/jfrog:/var/opt/jfrog/artifactory \
	releases-docker.jfrog.io/jfrog/artifactory-pro:7.33.9

端口说明:
8081: 用于RESTful API, 非手动操作皆调用该端口下的接口
8082: 对应Web访问


4. 插件安装

plugin_name: artifactory-injector-1.1.jar
alipan:artifactory-injector-1.1.jar 提取码: ob82
size: 1.51MB
SHA1: 1ed8fb52943787f7acc0b555d73ba3f5ed2ff97f

  • 容器外
    • 同步插件到服务器
    • 将插件放置在挂载目录: /app/jfrog
    • 修改权限为1030
      chown 1030:1030 /app/jfrog/artifactory-injector-1.1.jar
  • 容器内:
    • 进入容器:docker exec -it -u root jfrog bash
    • 使用插件:
      sh /opt/jfrog/artifactory/app/third-party/java/bin/java -jar /var/opt/jfrog/artifactory/artifactory-injector-1.1.jar

What do you want to do?
1 - generate License String
2 - inject artifactory

    1. 输入2选择 2 - inject artifactory
    1. 输入artifactory目录: /opt/jfrog/artifactory/app/artifactory/tomcat
    1. 输入yes, 完成插件安装
    1. 再次回到选择目录, 输入1选择1 - generate License String
    1. 复制密钥
    1. exit退出后,并退出容器exit

重启容器docker restart jfrog


5. 访问服务

访问服务IP: http://0.0.0.0/
默认用户名和密码为admin/password
设置新密码, 输入密钥.

posted @ 2022-02-28 16:30  Jrri  阅读(1199)  评论(2编辑  收藏  举报