Public | Automated Build

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


Docker Build for SQL-Ledger a erp solution for small businesses

Table of Contents


Dockerfile to build a SQL-Ledger container image which can be linked to other containers.
Will install Postgres and Apache2 and all the necessary packages for SQL-Ledger.


If you find this image useful here's how you can help:

  • Send a Pull Request with your awesome new features and bug fixes
  • Help new users with Issues they may encounter

Reporting Issues

Docker is a relatively new project and is active being developed and tested by a thriving community of developers and testers and every release of docker features many enhancements and bugfixes.

Given the nature of the development and release cycle it is very important that you have the latest version of docker installed because any issue that you encounter might have already been fixed with a newer docker release.

For ubuntu users I suggest installing docker using docker's own package repository since the version of docker packaged in the ubuntu repositories are a little dated.

Here is the shortform of the installation of an updated version of docker on ubuntu.

sudo apt-get purge
curl -s | sudo sh
sudo apt-get update
sudo apt-get install lxc-docker


Pull the latest version of 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 Docker Trusted Build service.

docker pull drnoa/sqlledger-docker

Alternately you can build the image yourself.

git clone
cd SQLLedger_docker
docker build -t="<name_of_your_container>" .

Quick Start

Run the SQL-Ledger image

docker run --name sqlledger_docker -d drnoa/sqlledger-docker:latest

Check the ip of your docker container

docker ps -q | xargs docker inspect | grep IPAddress | cut -d '"' -f 4

Got to the administrative interface of SQL-Ledger (e.g. using the password: admin123 and configure the database. All database users (SQL-Ledger and docker) use docker as password.

Alternately you can fetch the password set for the postgres user from the container logs.

docker logs <container-id>

To test if the postgresql server is working properly, try connecting to the server.

psql -U postgres -h $(docker inspect --format {{.NetworkSettings.IPAddress}} sqlledger_docker)


Data Store

For data persistence a volume should be mounted at /var/lib/postgresql.

The updated run command looks like this.

docker run --name <name_of_your_container> -d \
  -v /opt/postgresql/data:/var/lib/postgresql drnoa/sqlledger-docker:latest

This will make sure that the data stored in the database is not lost when the image is stopped and started again.

Securing the server

By default 'docker' is assigned as password for the postgres user.

You can change the password of the postgres user

psql -U postgres -h $(docker inspect --format {{.NetworkSettings.IPAddress}} <name_of_your_container>)
\password postgres

Build container from Dockerfile

You can build the container from the Dockerfile in

simply clone the git repo localy and then build

git clone
cd SQLLedger_docker
sudo docker build .

When you build the container using the Dockerfile you have the possibility to change some parameters
for example the used postgressql version or the database locale (default ist de_DE).
Its also possible to change the postgred passwords.
To change this paramters simply edit the Dockerfile and edit the following values:

ENV postgresversion 9.1
ENV locale de_CH
ENV postrespassword docker


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

  • Step 1: Stop the currently running image
docker stop <name_of_your_container>
  • Step 2: Update the docker image.
docker pull drnoa/sqlledger_docker:latest
  • Step 3: Start the image
docker run --name <name_of_your_container> -d [OPTIONS] drnoa/sqlledger_docker:latest
Docker Pull Command
Source Repository