Giter Club home page Giter Club logo

docker-basic's Introduction

Docker Basics

Building application with 3 services: A, B and C.

A: Generates M square matrices of order N of random numbers. The matrices should be generated at a rate of F matrices per second. Sends the results to B.

B: Inverts the input matrix and calculates determinant. Sends the results to C.

C: Receives the value of the determinant and shows on the screen.

Each service must run in a different container.

Installation

First of all you need to install docker. Go to Oficial page for more details about installation.

Image

Once you have docker installed, you can get the image of this aplication from my repository on Docker Hub.

docker pull luizcarloscf/servers-socket

Or you can build the image.

docker build --tag=servers-socket .

Network

Create our user-definied network.

docker network create my-net

Containers

Run the container that shows the results.

docker run --network=my-net --name=result servers-socket python3 result.py port=80

Run the container that calculate the determinant and forward the messages.

docker run -d --network=my-net --name=forward-det servers-socket python3 forward-det.py port_on=80 port_to=80

Run the container that generate the matrix.

docker run --network=my-net --name=generate-matrix servers-socket python3 generate-matrix.py port=80 m=1 n=10 f=2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.