Public | Automated Build

Last pushed: 10 months ago
Short Description
Short description is empty for this repo.
Full Description

Artifactory with mySQL

Run Artifactory inside a Docker container, linking to a mySQL container.

Docker image: stain/artifactory-with-mysql

This dockerfile is based on mattgruter/artifactory by
Matthias Grüter.

Volumes

Artifactory's data, logs and backup directories are exported as volumes:

/artifactory/data
/artifactory/logs
/artifactory/backup

Ports

The web server is accessible through port 8080.

Example

You will need to provide the image with a mySQL 5.5 server or newer. The simplest way to do this is using the
mysql-tuned-for-artifactory image:

docker run --name mysql-for-artifactory-data -v /var/lib/mysql busybox
docker run -d --volumes-from mysql-for-artifactory-data --name mysql-for-artifactory stain/mysql-for-artifactory

Wait a few seconds for mySQL to initialize, then run artifactory:

docker run --name artifactory --link mysql-for-artifactory:mysql -p 8080:8080 stain/artifactory-with-mysql

Now point your browser to http://localhost:8080/ to use Artifactory.

If your Artifactory is being used for deploying artifacts, you probably also want to keep the
/artifactory/data as a separate volume container:

docker run --name artifactory-data -v /artifactory/data busybox
docker run --name artifactory --volumes-from artifactory-data --link mysql-for-artifactory:mysql -p 8080:8080 stain/artifactory-with-mysql

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="-Xms3g -Xmx4g" -P stain/artifactory-with-mysql

Switching to Artifactory Pro

If you are using Artifactory Pro, the artifactory war archive has to be replaced. Unpack the Artifactory Pro distribution ZIP file and copy webapps/artifactory.war to a new directory. Then add this Dockerfile:

# Dockerfile for Artifactory Pro
FROM stain/artifactory-with-mysql
ADD ./artifactory.war /tomcat/webapps

Now build your child docker image:

docker build -t yourname/myartifactory

Run your image:

docker run -P yourname/myartifactory
Docker Pull Command
Owner
stain
Source Repository