Skip to content

nopparuts/workshop-depoy-microservice-java

 
 

Repository files navigation

My Docker Hub

Build Status

My catalog service in Google Cloud

Demo :: Deploy microservices with Docker

Step 1 :: Clone project

$git clone https://github.com/up1/workshop-depoy-microservice-java.git
$cd workshop-depoy-microservice-java
#ls

README.md catalog   product

Step 2 :: Build image of catalog service

$cd catalog
$docker image build -t catalog_service:1.0 .
$docker image ls

Step 3 :: Build image of product service

$cd product
$docker image build -t product_service:1.0 .
$docker image ls

Step 4 :: Push image to Container Image Registry (https://hub.docker.com/)

$docker login
Login Succeeded

$docker image tag catalog_service:1.0 akekmitl/catalog_service:1.0
$docker image push akekmitl/catalog_service:1.0

$docker image tag product_service:1.0 akekmitl/product_service:1.0
$docker image push akekmitl/product_service:1.0

Step 5 :: Deploy container with Docker compose

$cd ..
$docker-compose up -d
$docker-compose ps

                   Name                             Command             State              Ports
--------------------------------------------------------------------------------------------------------
workshop-depoy-microservice-java_catalog_1   java -jar catalog.jar   Up (healthy)   0.0.0.0:80->8080/tcp
workshop-depoy-microservice-java_product_1   java -jar product.jar   Up (healthy)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 87.3%
  • Dockerfile 12.7%