Skip to content

CBNCloud/sample-microservice-docker-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Microservice architecture, or simply microservices, is a distinctive method of developing software systems that tries to focus on building single-function modules with well-defined interfaces and operations. The trend has grown popular in recent years as Enterprises look to become more Agile and move towards a DevOps and continuous testing. Microservices can help create scalable, testable software that can be delivered weekly, not yearly.

Docker

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.

Container

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

Table of contents

Install

Please Clone your server

git clone git@github.com:CBNCloud/sample-microservice-docker-container.git

Docker-build

The docker build command builds Docker images from a Dockerfile and a “context”. A build’s context is the set of files located in the specified PATH or URL. The build process can refer to any of the files in the context. For example, your build can use a COPY instruction to reference a file in the context.so this sample microservices have 2 service :

Logins

cd logins

docker build -t logins .

in docker images you can see logins in images docker

Users

cd users

docker build -t users .

in docker images you can see Users in images docker

Docker

in docker you can start container, example :

docker run -d <images docker>

noted: by default follow the installation port in the docker image

Docker-port

same with Docker, but you can change docker port, example :

docker run -p <inggress>:<enggres> -d <images docker>

Push-docker-hub

you can push images docker hub :

Docker tag <images id > <dockerid>/<name images>:<tag>

noted: images id : you can see docker ( docker images )
dockerid : login dockerid
name images : you can see docker ( docker images )
tag : you must fill the tag, but you don't fill the name is latest

About

Sample Microservices login + Docker + CI/CD + Kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published