Difference between revisions of "Docker Image for developing"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
= MQTT BUS =
+
= Example of Docker Commands =
 +
 
 +
== Start a docker container and export server port ==
 +
 
 +
MQTT BUS
 
<pre>sudo docker run -d -it --name advigw-mqtt-bus -p 1883:1883 advigw4x86/mqtt-bus</pre>
 
<pre>sudo docker run -d -it --name advigw-mqtt-bus -p 1883:1883 advigw4x86/mqtt-bus</pre>
  
  
  
= API-Gateway =
+
API-Gateway
 
<pre>sudo docker run -d -it --name advigw-api-gw -p 3000:3000 advigw4x86/api-gw</pre>
 
<pre>sudo docker run -d -it --name advigw-api-gw -p 3000:3000 advigw4x86/api-gw</pre>
  
  
  
= WISESnail lib/sample & Development "WSN Connectivity" environment =
+
== Start a docker container and enter into bash ==
 +
 
 +
WISESnail lib/sample & Development "WSN Connectivity" environment
 
<pre>sudo docker run -d -it --name advigw-wisesnail-lib-dev -v $PWD:/home/adv/workspace:rw advigw4x86/wisesnail-lib
 
<pre>sudo docker run -d -it --name advigw-wisesnail-lib-dev -v $PWD:/home/adv/workspace:rw advigw4x86/wisesnail-lib
  
Line 16: Line 22:
  
  
= WSN Simulator =
+
== Stop /&nbsp;Start Docker Container ==
  
== Install & Run WSN Simulator ==
+
WSN Simulator
<pre>sudo docker run -d -it --name advigw-wsn-simulator advigw4x86/wsn-simulator</pre>
 
 
 
== Stop /&nbsp;Start&nbsp;WSN Simulator ==
 
 
<pre>sudo docker stop advigw-wsn-simulator
 
<pre>sudo docker stop advigw-wsn-simulator
  
Line 42: Line 45:
  
 
= [[How_to_create_a_Auto_Build_project_on_DockerHub_with_GitHub|How to create a Auto Build project on Docker hub with GitHub]] =
 
= [[How_to_create_a_Auto_Build_project_on_DockerHub_with_GitHub|How to create a Auto Build project on Docker hub with GitHub]] =
 
  
 
= Docker for Windows Hyper-V =
 
= Docker for Windows Hyper-V =

Revision as of 02:50, 4 September 2018

Example of Docker Commands

Start a docker container and export server port

MQTT BUS

sudo docker run -d -it --name advigw-mqtt-bus -p 1883:1883 advigw4x86/mqtt-bus


API-Gateway

sudo docker run -d -it --name advigw-api-gw -p 3000:3000 advigw4x86/api-gw


Start a docker container and enter into bash

WISESnail lib/sample & Development "WSN Connectivity" environment

sudo docker run -d -it --name advigw-wisesnail-lib-dev -v $PWD:/home/adv/workspace:rw advigw4x86/wisesnail-lib

sudo docker exec -it advigw-wisesnail-lib-dev bash


Stop / Start Docker Container

WSN Simulator

sudo docker stop advigw-wsn-simulator

sudo docker start advigw-wsn-simulator


Network Configuration in Docker Container

 sudo docker network create -d bridge --subnet 172.25.0.0/16 advigw_network
 
 sudo docker network connect advigw_network advigw-mqtt-bus
 
 sudo docker network connect advigw_network advigw-api-gw
 
 sudo docker network connect advigw_network advigw-wisesnail-lib-dev

 sudo docker network connect advigw_network advigw-wsn-simulator


How to create a Auto Build project on Docker hub with GitHub

Docker for Windows Hyper-V

https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-networking


https://docs.microsoft.com/zh-tw/virtualization/windowscontainers/manage-containers/container-networking