Docker Image For BookStack
<
8B81
img src="https://camo.githubusercontent.com/b2b6c811d7408acc7f0e8dae8169a87296dfc7156b36766e7a895d2d09644aa0/68747470733a2f2f696d616765732e6d6963726f6261646765722e636f6d2f6261646765732f6c6963656e73652f736f6c69646e6572642f626f6f6b737461636b2e737667" alt="" data-canonical-src="https://images.microbadger.com/badges/license/solidnerd/bookstack.svg" style="max-width: 100%; height: auto;">
Current Version: 23.5.2
In 0.28.0 we changed the container http port from 80 to 8080 to allow root privileges to be dropped
In 0.12.2 we removed DB_PORT
. You can now specify the port via DB_HOST
like DB_HOST=mysql:3306
With Docker Compose is a Quickstart very easy. Run the following command:
docker-compose up
and after that open your Browser and go to http://localhost:8080 . You can login with username 'admin@admin.com' and password 'password'.
If you have any issues feel free to create an issue on GitHub.
Note that if you want to use LDAP, $
has to be escape like \$
, i.e. -e "LDAP_USER_FILTER"="(&(uid=\${user}))"
Networking changed in Docker v1.9, so you need to do one of the following steps.
- MySQL Container:
docker run -d \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=bookstack \
-e MYSQL_USER=bookstack \
-e MYSQL_PASSWORD=secret \
--name bookstack_db \
mysql:5.7.21
- BookStack Container:
docker run -d --link bookstack_db_:mysql \
-p 8080:8080 \
--name bookstack_23.5.2 \
solidnerd/bookstack:23.5.2
- Create a shared network:
docker network create bookstack_nw
- Run MySQL container :
docker run -d --net bookstack_nw \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=bookstack \
-e MYSQL_USER=bookstack \
-e MYSQL_PASSWORD=secret \
--name="bookstack_db" \
mysql:5.7.21
- Run BookStack Container
docker run -d --net bookstack_nw \
-e DB_HOST=bookstack_db:3306 \
-e DB_DATABASE=bookstack \
-e DB_USERNAME=bookstack \
-e DB_PASSWORD=secret \
-e APP_URL=http://example.com \
-p 8080:8080 \
--name="bookstack_23.5.2" \
solidnerd/bookstack:23.5.2
The APP_URL parameter should be the base URL for your BookStack instance without a trailing slash. For example: APP_URL=http://example.com
To access your .env
file and important bookstack folders on your host system change <HOST>
in the following line to your host directory and add it then to your run command:
--mount type=bind,source=<HOST>/.env,target=/var/www/bookstack/.env \
-v <HOST>:/var/www/bookstack/public/uploads \
-v <HOST>:/var/www/bookstack/storage/uploads
In case of a windows host machine the .env file has to be already created in the host directory otherwise a folder named .env will be created.
After these steps you can visit http://localhost:8080 . You can login with username 'admin@admin.com' and password 'password'.
This is a fork of Kilhog/docker-bookstack. Kilhog did the intial work, but I want to go in a different direction.