Project

General

Profile

Docker recipes

This is list of Docker recipes to create my favorite containers.

Portainer

docker run --name portainer \
           --detach \
           --publish 9000:9000 \
           --restart always \
           --volume /var/run/docker.sock:/var/run/docker.sock \
           --volume portainer-data:/data \
           portainer/portainer

Docker registry

docker run --name registry \
           --detach \
           --publish 5000:5000 \
           --restart always \
           --volume registry-conf:/etc/docker/registry \
           --volume registry-data:/var/lib/registry \
           registry

docker run --name registry-web \
           --detach \
           --publish 8080:8080 \
           --restart always \
           --link registry \
           --env REGISTRY_URL=http://registry:5000/v2 \
           --env REGISTRY_NAME=localhost:5000 \
           hyper/docker-registry-web 

Redmine

Redmine with MySQL DB

docker run --name redmine-mysql \
           --detach \
           --restart always \
           --env MYSQL_ROOT_PASSWORD=redmine \
           --env MYSQL_DATABASE=redmine \
           --volume redmine-mysql:/var/lib/mysql \
           mysql

docker run --name redmine \
           --detach \
           --publish 3000:3000 \
           --restart always \
           --link redmine-mysql:mysql \
           --env MYSQL_ENV_MYSQL_DATABASE=redmine \
           --env MYSQL_ENV_MYSQL_USER=root \
           --env MYSQL_ENV_MYSQL_PASSWORD=redmine \
           --volume redmine-config:/usr/src/redmine/config \
           --volume redmine-files:/usr/src/redmine/files \
           --volume redmine-plugins:/usr/src/redmine/plugins \
           redmine

Redmine with PostgreSQL DB

docker run --name redmine-postgres \
           --detach \
           --restart always \
           --env POSTGRES_DB=redmine \
           --env POSTGRES_USER=redmine \
           --env POSTGRES_PASSWORD=redmine \
           --volume redmine-postgres:/var/lib/postgresql \
           --volume redmine-postgres-data:/var/lib/postgresql/data \
           postgres

docker run --name redmine \
           --detach \
           --publish 3000:3000 \
           --restart always \
           --link redmine-postgres:postgres \
           --env REDMINE_DB_DATABASE=redmine \
           --env REDMINE_DB_USERNAME=redmine \
           --env REDMINE_DB_PASSWORD=redmine \
           --volume redmine-config:/usr/src/redmine/config \
           --volume redmine-files:/usr/src/redmine/files \
           --volume redmine-plugins:/usr/src/redmine/plugins \
           --volume redmine-home:/home/redmine \
           redmine

Jenkins

docker run --name jenkins \
           --detach \
           --publish 8080:8080 \
           --publish 50000:50000 \
           --restart always \
           --volume jenkins:/var/jenkins_home \
           --volume /etc/timezone:/etc/timezone \
           --volume /etc/localtime:/etc/localtime \
           jenkins/jenkins:lts

SonarQube

docker run --name sonarqube-postgres \
           --detach \
           --restart always \
           --env POSTGRES_USER=sonar \
           --env POSTGRES_PASSWORD=sonar \
           --volume sonarqube-postgres:/var/lib/postgresql \
           --volume sonarqube-postgres-data:/var/lib/postgresql/data \
           postgres

docker run --name sonarqube \
           --detach \
           --publish 9001:9000 \
           --restart always \
           --link sonarqube-postgres:postgres \
           --env SONARQUBE_JDBC_URL=jdbc:postgresql://postgres:5432/sonar \
           --volume sonarqube-conf:/opt/sonarqube/conf \
           --volume sonarqube-data:/opt/sonarqube/data \
           --volume sonarqube-extensions:/opt/sonarqube/extensions \
           --volume sonarqube-bundled-plugins:/opt/sonarqube/lib/bundled-plugins \
           sonarqube

Owncloud

docker run --name owncloud-mysql \
           --detach \
           --restart always \
           --env MYSQL_ROOT_PASSWORD=owncloud \
           --env MYSQL_DATABASE=owncloud \
           --env MYSQL_USER=owncloud \
           --env MYSQL_PASSWORD=owncloud \
           --volume owncloud-mysql:/var/lib/mysql \
           mysql

docker run --name owncloud \
           --detach \
           --publish 8001:80 \
           --restart always \
           --link owncloud-mysql:mysql \
           --env MYSQL_ENV_MYSQL_DATABASE=owncloud \
           --env MYSQL_ENV_MYSQL_USER=owncloud \
           --env MYSQL_ENV_MYSQL_PASSWORD=owncloud \
           --volume owncloud:/var/www/html \
           --volume owncloud-apps:/var/www/html/apps \
           --volume owncloud-config:/var/www/html/config \
           --volume owncloud-data:/var/www/html/data \
           owncloud