Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run in docker (answer) #3

Open
leros1337 opened this issue Jun 5, 2024 · 7 comments
Open

How to run in docker (answer) #3

leros1337 opened this issue Jun 5, 2024 · 7 comments
Assignees

Comments

@leros1337
Copy link

Who wondering how to run it in docker/compose, success:

Add to env with path to *** (just mount it or copy to some dir that mounting into container), also i added 777 permissions to this files, dont know is it necessary or not

  artifactory:
    image: ${DOCKER_REGISTRY}/jfrog/artifactory-pro:${ARTIFACTORY_VERSION}
    container_name: artifactory
    user: "${UID}:${GID}"
    environment:
      - JF_ROUTER_ENTRYPOINTS_EXTERNALPORT=${JF_ROUTER_ENTRYPOINTS_EXTERNALPORT}
      - EXTRA_JAVA_OPTIONS=-javaagent:/opt/jfrog/artifactory/var/bootstrap/ArtifactoryAgent-1.0-SNAPSHOT-all.jar

Using keygen inside container, java binary located in /opt/jfrog/artifactory/app/third-party/java/bin/java so for me command will be /opt/jfrog/artifactory/app/third-party/java/bin/java -jar /opt/jfrog/artifactory/var/bootstrap/ArtifactoryKeygen-1.0-SNAPSHOT-all.jar gen, important info - verifyAgent not working inside container.
Logs of container on success:

2024-06-05T02:15:28.734Z [shell] [INFO ] [] [installerCommon.sh:1292       ] [main] - Redirection is set to false. Skipping catalina log redirection
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Artifactory Agent :: =====================================
Artifactory Agent ::   Artifactory Agent | by lamadaemon
Artifactory Agent ::   Is now LOADED!

View loaded params of java: docker container top artifactory

Working latest available version for current time: docker.jfrog.io/jfrog/artifactory-pro:7.84.12. I think it will work also for helm deploymentss. Hope it helps for someone 🤩

@leros1337 leros1337 changed the title How to run in docker How to run in docker (answer) Jun 5, 2024
@Lama3L9R Lama3L9R self-assigned this Jun 8, 2024
@Lama3L9R
Copy link
Owner

Lama3L9R commented Jun 8, 2024

I should consider creating a Wiki page for the FAQ

@pumpkin-nbc
Copy link

I should consider creating a Wiki page for the FAQ

是的 我用了下面的方式 可以解决
docker run -d
--name artifactory
--restart=always
-p 8081:8081
-p 8082:8082
-e TZ=Asia/Shanghai
-v /etc/localtime:/etc/localtime
-v /artifactory/var/:/var/opt/jfrog/artifactory
-v /artifactory/plug/:/plug
releases-docker.jfrog.io/jfrog/artifactory-pro:7.59.11
在/opt/jfrog/artifactory/var/etc/system.yaml shape下 加入 extraJavaOpts: "-javaagent:/opt/jfrog/artifactory/var/ArtifactoryAgent.jar"

cp /plug/ArtifactoryAgent-1.0-SNAPSHOT-all.jar /opt/jfrog/artifactory/var/ArtifactoryAgent.jar
cp /plug/ArtifactoryKeygen-1.0-SNAPSHOT-all.jar /opt/jfrog/artifactory/var/ArtifactoryKeygen.jar
然后重启容器之后
再计算密钥就可以了
/opt/jfrog/artifactory/app/third-party/java/bin/java -jar ArtifactoryKeygen.jar gen

@4erdenko
Copy link

4erdenko commented Aug 5, 2024

@leros1337 "important info - verifyAgent not working inside container."
What did you mean ?
so its works in docker or not?

im trying to run it in compose, but get some errors like:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'licenseAddonsManagerImpl' defined in class path resource [org/artifactory/addon/LicenseAddonsManagerImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.artifactory.addon.LicenseAddonsManagerImpl]: Constructor threw exception; nested exception is java.lang.VerifyError: Bad type on operand stack artifactory | Exception Details:

@4erdenko
Copy link

4erdenko commented Aug 5, 2024

okay its works on 7.84.12

@Lama3L9R Lama3L9R pinned this issue Aug 8, 2024
@pumpkin-nbc
Copy link

work on 7.84.x
not work on 7.90.x and later

@Lama3L9R
Copy link
Owner

work on 7.84.x not work on 7.90.x and later

Please do not reply to unrelated issues. If you want to discuss about 7.90+ agent not working, please go to #4. Also, the latest pre-release binary has not been tested yet!

@pumpkin-nbc
Copy link

work on 7.84.x not work on 7.90.x and later

Please do not reply to unrelated issues. If you want to discuss about 7.90+ agent not working, please go to #4. Also, the latest pre-release binary has not been tested yet!

Okay, just reply with a usable feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants