Showing posts with label Docker Compose. Show all posts
Showing posts with label Docker Compose. Show all posts

Sunday, November 17, 2019

Docker Compose Getting Started with JAVA RocketMQ


Motivation

Just want to try Docker Compose...

Prerequisites

Install Docker Compose on Ubuntu 18.04
https://ben-bai.blogspot.com/2019/11/install-docker-compose-on-ubuntu-1804.html

JAVA JMS: RocketMQ NameServer Broker Cluster
https://ben-bai.blogspot.com/2019/10/java-jms-rocketmq-nameserver-broker.html


Simple Note

Go to Dockerfile folder,

Add the docker-compose.yml below into it
https://github.com/benbai123/JSP_Servlet_Practice/blob/master/Practice/JAVA/JMS/RocketMQ/RocketMQCluster/docker-compose.yml

then run docker-compose up

Docker Compose will build image and run container with specified config value

Testing Video
https://youtu.be/QHQEacrtU9k

Shortly,

Dockerfile define "how to create the container"

docker-compose.yml describe "how to config/run containers"


References

Get started with Docker Compose
https://docs.docker.com/compose/gettingstarted/

Compose file version 3 reference
https://docs.docker.com/compose/compose-file/

Thursday, November 14, 2019

Install Docker Compose on Ubuntu 18.04


Simple Note

Just several lines of commands

# Run this command to download the current stable release of Docker Compose
# To install a different version of Compose, substitute 1.24.1 with the version of Compose you want to use.
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# Apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/docker-compose

# Test the installation.
docker-compose --version

# done


Reference

Install Docker Compose