Artifactory: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 8: | Line 8: | ||
export JFROG_HOME=$HOME/jfrog | export JFROG_HOME=$HOME/jfrog | ||
|} | |} | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
Line 17: | Line 15: | ||
|} | |} | ||
<source lang="bash"> | <source lang="bash"> | ||
docker run -it --rm \ | docker run -it --rm \ | ||
Line 78: | Line 29: | ||
chown -R 1030:1030 $JFROG_HOME/artifactory7/var | chown -R 1030:1030 $JFROG_HOME/artifactory7/var | ||
</source> | </source> | ||
<source lang="bash"> | ==Docker== | ||
===Debian=== | |||
<source lang="bash" highlight="5,6"> | |||
docker run --detach \ | docker run --detach \ | ||
--publish 9040:8081 \ | --publish 9040:8081 \ | ||
Line 86: | Line 39: | ||
--volume $JFROG_HOME/artifactory7/var/:/var/opt/jfrog/artifactory \ | --volume $JFROG_HOME/artifactory7/var/:/var/opt/jfrog/artifactory \ | ||
docker.bintray.io/jfrog/artifactory-oss:7.6.3 | docker.bintray.io/jfrog/artifactory-oss:7.6.3 | ||
</source> | </source> | ||
<source lang="bash"> | ===CentOS=== | ||
<source lang="bash" highlight="5,6"> | |||
docker run --detach \ | docker run --detach \ | ||
--publish 9040:8081 \ | --publish 9040:8081 \ | ||
--publish 9041:8082 \ | --publish 9041:8082 \ | ||
--name | --name artifactory \ | ||
--volume $JFROG_HOME/ | --volume $JFROG_HOME/artifactory7/var/:/var/opt/jfrog/artifactory:Z \ | ||
docker.bintray.io/jfrog/artifactory- | docker.bintray.io/jfrog/artifactory-oss:7.6.3 | ||
</source> | </source> | ||
<source lang="apache"> | ==Apache== | ||
# | ===Debian=== | ||
<Location /artifactory> | <code>vim /etc/apache2/sites-enabled/01-cid.chorke.org-le-ssl.conf</code> | ||
<source lang="apache" highlight="5,8-10"> | |||
<IfModule mod_ssl.c> | |||
<VirtualHost *:443> | |||
SSLProxyEngine On | |||
</Location> | ProxyRequests Off | ||
SSLProxyVerify None | |||
ProxyPreserveHost On | |||
AllowEncodedSlashes On | |||
SSLProxyCheckPeerCN Off | |||
SSLProxyCheckPeerName Off | |||
SSLProxyCheckPeerExpire Off | |||
# more others config skipped | |||
<Location /ui> | |||
Order Allow,Deny | |||
Allow from all | |||
ProxyPass http://localhost:9041/ui nocanon | |||
ProxyPassReverse http://localhost:9041/ui | |||
</Location> | |||
<Location /artifactory> | |||
Order Allow,Deny | |||
Allow from all | |||
ProxyPass http://localhost:9040/artifactory nocanon | |||
ProxyPassReverse http://localhost:9040/artifactory | |||
</Location> | |||
Include /etc/letsencrypt/options-ssl-apache.conf | |||
SSLCertificateFile /etc/letsencrypt/live/cid.chorke.org/cert.pem | |||
SSLCertificateKeyFile /etc/letsencrypt/live/cid.chorke.org/privkey.pem | |||
SSLCertificateChainFile /etc/letsencrypt/live/cid.chorke.org/chain.pem | |||
</VirtualHost> | |||
</IfModule> | |||
</ | |||
</source> | </source> | ||
< | <syntaxhighlight lang="bash"> | ||
apachectl -t | apachectl -t | ||
systemctl reload httpd | |||
systemctl restart httpd | |||
# http://cid.chorke.org/artifactory/webapp/#/login@admin/password | |||
</syntaxhighlight> | |||
docker | ==To Run== | ||
<source lang="bash"> | |||
docker exec -it artifactory bash | |||
docker start artifactory | |||
docker stop artifactory | |||
docker logs artifactory | docker logs artifactory | ||
</source> | </source> | ||
== | ==Knowledge== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# filter and remove docker images, containers | # filter and remove docker images, containers |
Revision as of 17:40, 25 August 2020
Linux: export JFROG_HOME=/srv/jfrog |
MacOS: export JFROG_HOME=$HOME/jfrog |
Local location | Container location | Usage |
---|---|---|
$JFROG_HOME/artifactory7/var/ |
/var/opt/jfrog/artifactory |
For storing artifactory data |
docker run -it --rm \
--publish 9040:8081 \
--publish 9041:8082 \
docker.bintray.io/jfrog/artifactory-oss:7.6.3 \
bin/bash
id; exit
mkdir -p $JFROG_HOME/artifactory7/var/etc/
touch $JFROG_HOME/artifactory7/var/etc/system.yaml
chown -R 1030:1030 $JFROG_HOME/artifactory7/var
Docker
Debian
docker run --detach \
--publish 9040:8081 \
--publish 9041:8082 \
--name artifactory \
--volume $JFROG_HOME/artifactory7/var/:/var/opt/jfrog/artifactory \
docker.bintray.io/jfrog/artifactory-oss:7.6.3
CentOS
docker run --detach \
--publish 9040:8081 \
--publish 9041:8082 \
--name artifactory \
--volume $JFROG_HOME/artifactory7/var/:/var/opt/jfrog/artifactory:Z \
docker.bintray.io/jfrog/artifactory-oss:7.6.3
Apache
Debian
vim /etc/apache2/sites-enabled/01-cid.chorke.org-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLProxyEngine On
ProxyRequests Off
SSLProxyVerify None
ProxyPreserveHost On
AllowEncodedSlashes On
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
SSLProxyCheckPeerExpire Off
# more others config skipped
<Location /ui>
Order Allow,Deny
Allow from all
ProxyPass http://localhost:9041/ui nocanon
ProxyPassReverse http://localhost:9041/ui
</Location>
<Location /artifactory>
Order Allow,Deny
Allow from all
ProxyPass http://localhost:9040/artifactory nocanon
ProxyPassReverse http://localhost:9040/artifactory
</Location>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/cid.chorke.org/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cid.chorke.org/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/cid.chorke.org/chain.pem
</VirtualHost>
</IfModule>
apachectl -t
systemctl reload httpd
systemctl restart httpd
# http://cid.chorke.org/artifactory/webapp/#/login@admin/password
To Run
docker exec -it artifactory bash
docker start artifactory
docker stop artifactory
docker logs artifactory
Knowledge
# filter and remove docker images, containers
docker rm $(docker ps --all -q -f status=dead)
docker rmi $(docker images -qa -f 'dangling=true')
docker rm artifactory && docker rmi docker.bintray.io/jfrog/artifactory-oss:4.1.0
# docker container debug, checking history & service
docker run --name='artifactory' -it docker.bintray.io/jfrog/artifactory-oss:4.1.0
docker history docker.bintray.io/jfrog/artifactory-oss:4.1.0
docker exec -it artifactory /bin/bash
docker exec -it artifactory bash
docker logs artifactory
service --status-all