Public | Automated Build

Last pushed: 4 days ago
Short Description
Run Artifactory OSS (or Pro) inside a Docker container.
Full Description


Run Artifactory inside a Docker container.

Link: mattgruter/artifactory


Artifactories data, logs and backup directories are exported as volumes:



The web server is accessible through port 8080.


To run artifactory do:

docker run -p 8080:8080 mattgruter/artifactory

Now point your browser to http://localhost:8080


The artifactory servlet is available at the artifactory/ path. However a filter redirects all paths outside of artifactory/ to the artifactory servlet. Thus instead of linking to the URL http://localhost:8080/artifactory/libs-release-local you can just link to http://localhost:8080/libs-release-local (i.e. omitting the subpath artifactory/).

Runtime options

Inject the environment variable RUNTIME_OPTS when starting a container to set Tomcat's runtime options (i.e. CATALANA_OPTS). The most common use case is to set the heap size:

docker run -e RUNTIME_OPTS="-Xms256m -Xmx512m" -P mattgruter/artifactory

Switching to Artifactory Pro

If you are using Artifactory Pro, the artifactory war archive has to be replaced. The image tagged -onbuild is built with an ONBUILD trigger for this purpose. Unpack the Artifactory Pro distribution ZIP file and place the file artifactory.war (located in the archive) in the same directory as a simple Dockerfile that extends the onbuild image:

# Dockerfile for Artifactory Pro
FROM mattgruter/artifactory:latest-onbuild

Now build your child docker image:

docker build -t yourname/myartifactory .

The ONBUILD trigger ensures your artifactory.war is picked up and applied to the image upon build.

docker run -P yourname/myartifactory
Docker Pull Command

Comments (12)
a month ago

Default login: admin, password: password

6 months ago

What's to user/pasword to login to http://localhost:8080

8 months ago

how can I mount the data locally not in the container, because if I shut down the container the maven I have installed will disappear

a year ago

This repo is outdated, I downloaded from bintray's repo. Here is the full documentation

a year ago

As you mentioned, I would suggest to make sure you install JDK 8 and update your JAVA_HOME environment variable to point to your JDK 8 installation.

  • If you installed Artifactory as a Linux service, browse to your $ARTIFACTORY_HOME/bin directory and execute the following command as root:$ARTIFACTORY_HOME/bin/
2 years ago

@chaya56 I see that also on the production server, but it works locally. hm.

2 years ago

I'm using Artifactory Pro version 4.0.2. I successfully built image following your instructions.

When I run however Artifactory fails to start:

SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file

I attached to the running container and found this in the Tomcat log:

Aug 20, 2015 1:40:48 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener
java.lang.UnsupportedClassVersionError: org/artifactory/webapp/servlet/ArtifactoryHomeConfigListener : Unsupported major.minor version 52.0 (unable to load class org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener)

I thought perhaps an upgrade to Java 8 would resolve the issue but I was unsuccessful in finding a way to do that.


2 years ago

Hello Mattgrutter, thanks for this image, but it seems i 've an infinite loop when i try to access to webserver: etc...

2 years ago

@kamranazeem Yes it's because of the ONBUILD trigger in the image. The latest version of the image (build date June 30) doesn't have the trigger anymore so you're image should build now.
If you however rely on the ONBUILD trigger you can from now on use the images tagged with "*-onbuild".

2 years ago

Hi, I am trying to build artifactory using your image. When I try to build, I do not see a success message, nor I see kamran/artifactory appearing in my list of images. What could be wrong? Is it because I do not have a artifactory.war (as I am using OSS version, not PRO version? Is it because the ONBUILD fails, and then the image is not built successfully?

The Docker file:

[root@centos7-1-docker artifactory]# cat Dockerfile

FROM mattgruter/artifactory

[root@centos7-1-docker artifactory]#

The build attempt:

[root@centos7-1-docker artifactory]# docker build -t kamran/artifactory .

Sending build context to Docker daemon 2.048 kB

Sending build context to Docker daemon

Step 0 : FROM mattgruter/artifactory

Executing 1 build triggers

Trigger 0, ADD ./artifactory.war webapps/

Step 0 : ADD ./artifactory.war webapps/

INFO[0000] artifactory.war: no such file or directory

[root@centos7-1-docker artifactory]#