Update Docker config and doc

This commit is contained in:
Frederic Guillot 2015-07-19 10:45:45 -04:00
parent 074cfa5d7a
commit abb0a9bba4
2 changed files with 26 additions and 7 deletions

View File

@ -4,11 +4,13 @@ MAINTAINER Frederic Guillot <fred@kanboard.net>
RUN apt-get update && apt-get install -y apache2 php5 php5-gd php5-sqlite git curl && apt-get clean
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN curl -sS https://getcomposer.org/installer | php -- --filename=/usr/local/bin/composer
RUN cd /var/www && git clone https://github.com/fguillot/kanboard.git
RUN cd /var/www/kanboard && composer install
RUN cd /var/www && git clone --depth 1 https://github.com/fguillot/kanboard.git
RUN cd /var/www/kanboard && composer --prefer-dist --no-dev --optimize-autoloader --quiet install
RUN rm -rf /var/www/html && mv /var/www/kanboard /var/www/html
RUN chown -R www-data:www-data /var/www/html/data
VOLUME /var/www/html/data
EXPOSE 80
ENV APACHE_RUN_USER www-data

View File

@ -1,13 +1,24 @@
How to test Kanboard with Docker?
=================================
How to run Kanboard with Docker?
================================
Kanboard can run with [Docker](https://www.docker.com).
Kanboard can run easily with [Docker](https://www.docker.com).
There is a `Dockerfile` in the repository to build your own container.
Use the automated build
-----------------------
Every new commit on the repository trigger a new build on [Docker Hub](https://registry.hub.docker.com/u/kanboard/kanboard/).
```bash
docker run -d --name kanboard -p 80:80 -t kanboard/kanboard:latest
```
The tag **latest** is the **development version** of Kanboard, use at your own risk.
Build your own Docker image
---------------------------
From your kanboard directory run the following command:
Clone the Kanboard repository and run the following command:
```bash
docker build -t youruser/kanboard:master .
@ -22,8 +33,14 @@ docker run -d --name kanboard -p 80:80 -t youruser/kanboard:master
Store your data on a volume
---------------------------
You can also save your data outside of the container, on the local machine:
By default Kanboard will store attachments and the Sqlite database in the directory data. Run this command to use a custom volume path:
```bash
docker run -d --name kanboard -v /your/local/data/folder:/var/www/html/data -p 80:80 -t kanboard/kanboard:master
```
References
----------
- [Official Kanboard images](https://registry.hub.docker.com/u/kanboard/kanboard/)
- [Docker documentation](https://docs.docker.com/)