An apache archiva 2.2.3 container designed for a simple standalone deployment. Key features are:
- The configuration/data is truly externalized, allowing container replacement/upgrading (
/archiva-data
) - Configurable HTTPS support is included, with the ability to assign custom keystore
- Linked container support for mysql/mariadb using the
db
alias. - Automatic installation of CA certificates into the container
The configuration of the container was created following the support guide suggested by Archiva standalone installation guide.
The command below will setup a running archiva container with externalized data/configuration
docker run -d --name archiva -h archiva -d -p 8080:8080 -v /archiva_mnt:/archiva-data xetusoss/archiva
SSL_ENABLED
: Configure HTTPS support or not.KEYSTORE_PATH
: The keystore path for jetty HTTPS certificate to use. Default is/archiva-data/ssl/keystore
.KEYSTORE_PASS
: The keystore and certificate password to use. Default ischangeit
.KEYSTORE_ALIAS
: The certificate alias to use. Default isarchiva
.CA_CERT
andCA_CERTS_DIR
: Specify the CA cert(Or the path to dir store multiply certs) to install into system keystore.DB_TYPE
: The database type, eithermysql
orderby
. Default isderby
.USERS_DB_NAME
: Only used ifDB_TYPE=mysql
, the database name for theusers
db. Default isarchiva_users
.DB_USER
: Only used ifDB_TYPE=mysql
, the user to make the db connection with. Default isarchiva
.DB_PASS
: Only used ifDB_TYPE=mysql
, the db user's password. Default isarchiva
.DB_HOST
: Only used ifDB_TYPE=mysql
, the db hostname or IP. Default isdb
.DB_PORT
: Only used ifDB_TYPE=mysql
, the db port to connect to. Default is3306
.
Make sure /somepath/archiva_mnt exists
docker run --name archiva -h archiva -d -p 443:8443\
-e SSL_ENABLED=true -v /somepath/archiva_mnt:/archiva-data xetusoss/archiva
Copy the custom keystore in data mount under ssl/keystoer
. The locations can be changed using the KEYSTORE_PATH
.
docker run --name archiva -h archiva -d -p 443:8443\
-e SSL_ENABLED=true -e KEYSTORE_PASS="mypass" -v /somepath/archiva_mnt:/archiva-data xetusoss/archiva
The example below creates a archiva container with the linked mysql db. Please make sure archiva_users
database created first, these database name can be changed using USERS_DB_NAME
.
docker run --name archiva -h archiva -p 443:8443\
-v /somepath/archiva_mnt:/archiva-data --link mysql:db -e SSL_ENABLED=true xetusoss/archiva
The example below creates a archiva container using an external db. Please make sure archiva_users
database created first, these database name can be changed using USERS_DB_NAME
.
docker run --name archiva -h archiva -p 443:8443\
-v /somepath/archiva_mnt:/archiva-data -e DB_TYPE="mysql"\
-e DB_HOST="db.example.com"-e DB_USER="SOMEUSER"\
-e DB_PASS="SOMEPASS" -e SSL_ENABLED=true xetusoss/archiva
The externalized data directory contains 4 directories: data
, logs
, conf
, and repositories
All directory are all standard in an archiva installation, so reference the archiva documentation for those.
Pull requests/code copying are welcome.