I created this docker configuration pool so that when I forget the configuration environment, I can reuse it.
Basic command :
docker-compose -f $FILENAME up -d
docker-compose -f $FILENAME down -vDownload docker compose configuration using curl
curl -o kafka-cli.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/kafka-cli.yamlThis yaml kafka-cli.yaml will create a new container zookeeper and exposed port 2181 on host port. Also create a new container kafka and exposed port 29092, 9092 and 9101 on host port.
By default there are 16 databases (indexed from 0 to 15) and you can navigate between them using select command. Number of databases can be changed in redis config file with databases setting.
Download docker compose configuration using curl
curl -o redis.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/redis.yamlThis yaml redis.yaml will create a new container redis and exposed port 6379 on host port.
Redis CLI
Run redis-cli
docker exec -it redis redis-cliSelect the Redis logical database having the specified zero-based numeric index. New connections always use the database 0.
Change database.
select [INDEX]Set and get key
set [KEY_NAME] [VALUE]
get [KEY_NAME]Another Redis Desktop Manager
Install Another Redis Desktop Manager with homebrew. You can run with following command on your terminal.
brew install cask
brew install --cask another-redis-desktop-managerOpen the application, and should looks like below.
Another Redis Desktop Manager dashboard
Another Redis Desktop Manager add new key.
Download docker compose configuration using curl
curl -o mysql.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/mysql.yamlThis yaml mysql.yaml will create a new container mysql and exposed port 3306 on host port.
Create network my-network if does not exists
docker network create my-networkCreate volume mysql-data to persist data then run docker-compose
docker volume create mysql-dataMySQL CLI
Run this command to run MySQL command on container. Default user is root and password SevenEightTwo782 you can change the password in yaml file.
docker exec -it mysql bashBasic command:
- Login into database, then type your password
mysql -u root -p
- Get list of databases
show databases;
- Create database and use database
create database $DB_NAME; use $DB_NAME;
Download docker compose configuration using curl
curl -o postgresql.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/postgresql.yamlThis yaml postgresql.yaml will create a new container postgresql and exposed port 5432 on host port.
Create network my-network if does not exists
docker network create my-networkCreate volume postgre-data to persist data then run docker-compose
docker volume create postgre-dataPostgre SQL CLI
Run this command to run PostgreSQL command on container. Default user is postgres and password SevenEightTwo782 you can change the password in yaml file.
docker exec -it postgresql bashBasic command:
- Login into database
psql -Upostgres -w
- Get list of databases
\l
- Create database and use database
create database $DB_NAME; \c $DB_NAME
Download docker compose configuration using curl
curl -o sqlserver.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/sqlserver.yamlThis yaml sqlserver.yaml will create a new container sqlserver and exposed port 1433 on host port.
Create network my-network if does not exists
docker network create my-networkCreate volume sqlserver-data and sqlserver-user to persist data then run docker-compose
docker volume create sqlserver-data && docker volume create sqlserver-userSQL Server CLI
Run this command to run SQL Server command on container. Default user is sa and password SevenEightTwo782 you can change the password in yaml file.
docker exec -it sqlserver /opt/mssql-tools/bin/sqlcmd -U sa -P SevenEightTwo782Basic command:
- Get list of databases
select name from sys.databases go
- Create database and use database
create database $DB_NAME go
Download docker compose configuration using curl
curl -o rabbitmq.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/rabbitmq.yamlThis yaml rabbitmq.yaml will create a new container rabbitmq and exposed port 5672 and 15672 on host port.
Create network my-network if does not exists
docker network create my-networkCreate volume rabbitmq-data and rabbitmq-log to persist data then run docker-compose
docker volume create rabbitmq-data && docker volume create rabbitmq-logRabbitMq Management
Default RabbitMQ management user is guest and password is guest. Go to localhost:15672 to acess RabbitMQ management.
Download docker compose configuration using curl
curl -o sonarqube.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/sonarqube.yamlThis yaml sonarqube.yaml will create a new container sonarqube and exposed port 9000 and 9002 on host port.
Create network my-network if does not exists
docker network create my-networkCreate volume to persist data then run docker-compose
docker volume create sonarqube-data && docker volume create sonarqube-extensions && docker volume create sonarqube-logs && docker volume create sonarqube-tempSonarqube Management
Default Sonarqube management user is admin and password is admin. Go to localhost:9000 to acess Sonarqube management and then change the default password first.
Download docker compose configuration using curl
curl -o mongodb.yaml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/mongodb.yamlThis yaml mongodb.yaml will create a new container mongodb and exposed port 27017 on host port.
Create network my-network if does not exists
docker network create my-networkCreate volume to persist data then run docker-compose
docker volume create mongodb-data && docker volume create mongodb-configMongoDB CLI
Run this command to run MongoDB command on container. Default user is root and password SevenEightTwo782 you can change the password in yaml file.
docker exec -it mongodb mongo -u root -p SevenEightTwo782 --authenticationDatabase admin <SOME_DATABASE>Basic command:
- Get list of databases
show dbs
- Create database and use database
use some_db db
- Create collection
db.createCollection('some_collection');
- Insert row
db.some_db.insertMany([ { _id: 1, first_name: "Maverick", last_name: "Johnson", gender: 1 }, { _id: 2, first_name: "Calvin", last_name: "Joe", gender: 1 }, { _id: 3, first_name: "Kagura", last_name: "Otsusuki", gender: 0 } ]);
- Find row
db.some_db.find();
- Update row
db.test.updateOne({_id: 1}, {$set: { first_name: "Maverick", last_name: "Johnson Updated", gender: 1 }});




