Install FLECS Core Using Docker

For users familiar with Docker, FLECS can be installed directly using Docker images. This method is ideal for those who prefer containerized environments and have Docker installed on their system.

Prerequisites for Docker Installation

  • Docker installed on your system (version 20.10.5 or higher).

  • Ensure that your system is compatible with Docker and has internet access to pull images.

Installation Steps

Deploy FLECS Using Docker Compose

If you prefer using Docker Compose, create a docker-compose.yml file with the following content:

version: "3.7"
services:
  flecsd:
    image: flecspublic.azurecr.io/flecs-slim:3.2.0-hedgehog
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - flecsd:/var/lib/flecs
    restart: always
    network_mode: host
    command: 172.21.0.1
  webapp:
    image: flecspublic.azurecr.io/webapp:3.2.0-hedgehog
    ports:
      - 8081:80
    depends_on:
      - flecsd
    restart: always
    extra_hosts:
      - flecs-flecsd:172.21.0.1
    networks:
      flecs:
        ipv4_address: 172.21.255.254
volumes:
  flecsd:
networks:
  flecs:
    name: flecs
    driver: bridge
    ipam:
      config:
        - subnet: 172.21.0.0/16

Then, deploy FLECS by running:

docker-compose up -d

Manual Docker Run Commands

Alternatively, you can start the FLECS components manually using Docker commands.

  1. Create a Custom Bridge Network FLECS does not rely on Docker's default bridge as its configuration may vary and it is not recommended for production use. Before installing FLECS, it is advisable to create a custom bridge network. This ensures better network management and isolation:

docker network create --driver bridge --subnet 172.21.0.0/16 flecs
  1. Deploy the FLECS Daemon (flecsd) Start by deploying the FLECS daemon (flecsd) using the following command:

docker run -d --rm --name flecs-flecsd --network host -v flecsd:/var/lib/flecs -v /run/docker.sock:/run/docker.sock flecspublic.azurecr.io/flecs-slim:3.2.0-hedgehog 172.21.0.1
  • This command runs flecs-flecsd in detached mode, using the host network for better performance and simplicity. It also mounts necessary volumes for persistent storage and Docker socket sharing.

  1. Deploy the FLECS WebApp Next, deploy the FLECS WebApp:

docker run -d --rm --name flecs-webapp --network flecs --ip 172.21.255.254 --add-host flecs-flecsd:172.21.0.1 -p 8081:80 flecspublic.azurecr.io/webapp:3.2.0-hedgehog
  • This command sets up the WebApp on the custom bridge network flecs, assigns it a specific IP address, and maps the container's port 80 to the host's port 8081.

Interacting with the WebApp

After installation, open a browser and navigate to http://localhost:8081/ to open the FLECS WebApp.

Install FLECS on Your Device with FILiP

For those who wish to install FLECS on their own hardware, FILiP simplifies the process with a one-liner installation command. This method is ideal if you want to use your existing Linux-based device for automation tasks.

Last updated