Skip to content

getting started guid

frank-dspeed edited this page Sep 15, 2014 · 1 revision

Version

Current Version: 2.5.2-2

Installation

Pull the image from the docker index. This is the recommended method of installation as it is easier to update image in the future. These builds are performed by the Trusted Build service.

docker pull dockerimages/redmine:latest

Since version 2.4.2, the image builds are being tagged. You can now pull a particular version of redmine by specifying the version number. For example,

docker pull dockerimages/redmine:2.5.2-2

Alternately you can build the image yourself.

git clone https://github.com/dockerimages/docker-redmine.git
cd docker-redmine
docker build --tag="$USER/redmine" .

Quick Start

Run the redmine image with the name "redmine".

docker run --name=redmine -it --rm -p 10080:80 \
dockerimages/redmine:2.5.2-2

NOTE: Please allow a minute or two for the Redmine application to start.

Point your browser to http://localhost:10080 and login using the default username and password:

  • username: admin
  • password: admin

You should now have the Redmine application up and ready for testing. If you want to use this image in production the please read on.

Shell Access

For debugging and maintenance purposes you may want access the container shell. Since the container does not include a SSH server, you can use the nsenter linux tool (part of the util-linux package) to access the container shell.

Some linux distros (e.g. ubuntu) use older versions of the util-linux which do not include the nsenter tool. To get around this @jpetazzo has created a nice docker image that allows you to install the nsenter utility and a helper script named docker-enter on these distros.

To install the nsenter tool on your host execute the following command.

docker run --rm -v /usr/local/bin:/target dockerimages/nsenter

Now you can access the container shell using the command

sudo docker-enter redmine

For more information refer https://github.com/dockerimages/nsenter

Another tool named nsinit can also be used for the same purpose. Please refer https://jpetazzo.github.io/2014/03/23/lxc-attach-nsinit-nsenter-docker-0-9/ for more information.

Upgrading

To upgrade to newer redmine releases, simply follow this 4 step upgrade procedure.

Step 1: Update the docker image.

docker pull dockerimages/redmine:2.5.2-2

Step 2: Stop and remove the currently running image

docker stop redmine
docker rm redmine

Step 3: Backup the database in case something goes wrong.

mysqldump -h <mysql-server-ip> -uredmine -p --add-drop-table redmine_production > redmine.sql

Step 4: Start the image

docker run --name=redmine -d [OPTIONS] dockerimages/redmine:2.5.2-2

Rake Tasks

The app:rake command allows you to run redmine rake tasks. To run a rake task simply specify the task to be executed to the app:rake command. For example, if you want to send a test email to the admin user.

docker run --name=redmine -d [OPTIONS] \
  dockerimages/redmine:2.5.2-2 app:rake redmine:email:test[admin]

Similarly, to remove uploaded files left unattached

docker run --name=gitlab -d [OPTIONS] \
  dockerimages/gitlab:7.2.1 app:rake redmine:attachments:prune

For a complete list of available rake tasks please refer www.redmine.org/projects/redmine/wiki/RedmineRake.