Orbs Network
  • Overview
    • What is Orbs?
    • Layer 3 Protocol
    • Running on EVM and TON
    • Enhanced Execution
    • L3 for Advanced Trading
    • Network Diagram
    • White Papers and Spec
  • Orbs Lambda
    • What is Orbs Lambda?
    • Network Diagram
    • Example Use Cases
    • Step by Step Overview
      • Development Requirements
      • Select Unique ID
      • Project Template
      • index.js Implementation
        • Execution Environment
        • Allowed Packages
        • Supported Networks
        • Execution Triggers
        • Sending Transactions
      • Testing Locally
      • Deploying to Production
      • Analyzing Execution
  • Orbs VM
    • What is Orbs VM?
    • Network Diagram
    • Example Use Cases
    • Step by Step Overview
      • Development Requirements
      • Select Unique ID
      • Docker Image Implementation
        • Execution Environment
        • Working Directory
        • Entry Point
        • Health Check
        • status.json
      • Testing Locally
      • Deploying to Production
      • Analyzing Execution
  • Powered by Orbs
    • Liquidity Hub
      • Integration Spec
    • Perpetual Hub
    • dTWAP Protocol
      • Integration Spec
      • Network Diagram
      • dTWAP Tutorial
      • FAQ
    • dLIMIT Protocol
      • Integration Spec
      • dLIMIT Tutorial
      • FAQ
  • Community Projects
    • Notification Protocol
      • Integrate a New Project
      • Network Diagram
    • TON Access
      • Network Diagram
    • TON Vote
Powered by GitBook
On this page
  • Dockerfile
  • Best practices
  • Health check and status
  • Complete example
  1. Orbs VM
  2. Step by Step Overview

Docker Image Implementation

PreviousSelect Unique IDNextExecution Environment

Last updated 2 years ago

Any standard Docker image can be executed on the Orbs Network. The image must adhere to certain requirements to support efficient orchestration by the protocol.

Dockerfile

The most important part of a Docker image is the . Orbs VM supports the standard file format as interpreted by orchestrators like .

Best practices

To make sure your image as efficient as possible, be sure to follow the . It is recommended to base your docker image on the official .

Health check and status

To be a good citizen on the image orchestration protocol, your image must respond to queries. When an image fails to respond to health check with an appropriate exit code, it will be restarted. Images that fail to eventually start and reach a healthy state are at risk of non execution.

To support monitoring by the community, your service should maintain a local file that shares its current status with the outside world. The contents of this file are publicly available from every node running the service via the .

Complete example

The following Dockerfile example creates a Node.js service based on Alpine Linux. The service uses a shell script that executes a Node.js script for performing the health check and updating status.json periodically.

FROM node:16-alpine

# standard working directory
WORKDIR /opt/orbs

# install your app
COPY package*.json ./
RUN npm install
COPY dist ./dist
CMD [ "npm", "start" ]

# install healthcheck based on status.json
COPY ./healthcheck.sh ./
COPY ./healthcheck.js ./
HEALTHCHECK CMD /opt/orbs/healthcheck.sh

# install entry point executable
COPY ./entrypoint.sh /opt/orbs/service
Dockerfile
Docker Swarm
best practices for writing Dockerfiles
Alpine Linux
health check
status.json
network status page