Skip to content
Logan Gorence edited this page Aug 2, 2016 · 1 revision

DSA has support for Docker via Docker Images.

This page assumes you have basic knowledge of Docker, and already have Docker installed.

DGLux Server

DGLux Server is available on Docker Hub.

Create a Server Container

# Create a container that is exposed on port 8080.
# This command will output a container id to be used by other commands.
# This step only needs to be done once for each image version.
$ docker create -p 0.0.0.0:8080:80 -v /var/dglux:/data iotdsa/dglux-server
your_container_id

# Start the container.
# After running this command, DGLux Server will be accessible
# at http://127.0.0.1:8080
$ docker start your_container_id

# Stop the container.
$ docker stop your_container_id

Building your own image

To build your own image, create a file named Dockerfile in a blank directory with the following content, modifying to fit your needs:

FROM iotdsa/dglux-server

################################################
# Each block below is an example customization #
#   Multiple customizations can be combined.   #
################################################

################################################
#               Custom Projects                #
################################################

# Load a project export.
# Place the project export in the directory that
# contains the Dockerfile
ADD project.zip /app
RUN unzip project.zip -d /app/files/proj && rm project.zip

################################################
#           Change Server Options              #
################################################

# Customize the server options.
# Place a custom server.json file in the
# directory that contains the Dockerfile
ADD server.json /data

################################################
#               Customize Users                #
################################################

# Add a user.
RUN dart bin/users.dart add -u myuser -p mypassword

Then execute the following:

# Build an image with your customizations.
$ docker build -t my-dglux-server --rm=true .

# Create a container using the created image.
$ docker create -p 0.0.0.0:8080:80 -v /var/dglux:/data my-dglux-server

Protocol
 ◌ Design
 ◌ Initializing Connection
 ◌ Node API
  ◌ Methods
  ◌ Broker
   ◌ Broker Discovery
  ◌ Configs
  ◌ Value Types
 ◌ Tokens
 ◌ Quality of Service
DSLink Manager
 ◌ dslink.json
 ◌ Startup Command
SDK Development
 ◌ Implementation Guide
DSA Server
 ◌ Installation
 ◌ Update Server
 ◌ Server Configuration
 ◌ CLI Tools
 ◌ DSA Permission Basics
 ◌ DSA Permission Model
  ◌ Permission List for the Root
 ◌ Authentication
  ◌ OpenID Connect
  ◌ Password Hasher
 ◌ DGLux Server SSL (HTTPS)
 ◌ Docker
 ◌ Audit
 ◌ Data Node
 ◌ Install NGINX with DSA Server
 ◌ Configure Ubuntu Linux to auto start DSA server
 ◌ Troubleshooting

Clone this wiki locally