Skip to main content

Capture Edge on Docker

We recommend to install Capture Edge using Docker and Docker Compose on Linux. If you already have Docker and Docker-compose installed you can start Capture Edge by unzipping the zip file and running the following command in the extracted directory:

docker compose up -d

If you don't have Docker yet, you can extract the zip file and run Install.sh. This will install all required dependencies and start Capture Edge.

Versioning​

By default, the latest released version will be used. To stay on a specific version, edit docker-compose.yml and change the latest tag to the desired version for each component. You can use a version in major.minor format, or major.minor.patch, for example 2.2 or 2.1.6. If no patch is defined (the last number), the latest patch of that version will be used.

Configuring Capture Edge with Docker Networking​

Each Docker container has its own network stack. Inside a container, localhost and 127.0.0.1 refer to that container, not to the host machine or to the other Capture Edge containers. Containers reach each other by their service name, for example influxdb.

Database connections​

Capture Edge stores collected data in a local database: InfluxDB by default, or Redis if you enable it in docker-compose.yml.

  • InfluxDB:

    When Capture Edge runs in Docker and the InfluxDB address is http://localhost or http://127.0.0.1, the CloudManager checks whether that address answers. If it doesn't and http://influxdb does, it changes the address to http://influxdb and logs a warning. The default setup needs no manual step.

    To set the address yourself, open Configuration → Local storage, select the InfluxDB database, and on the Settings tab set Address to http://influxdb.

  • Redis (if applicable):

    The redis service is commented out in the provided docker-compose.yml. To use Redis, uncomment the whole redis service. Then open Configuration → Local storage, select the Redis database, and set Address to redis and Port to 6379. Capture Edge does not change the Redis address for you. Port 6380 is only the port published on the host; containers use 6379.

Important note​

Don't use localhost or 127.0.0.1 for connections between Capture Edge containers. Use the service name of the container instead, for example influxdb.

Data persistence​

InfluxDB keeps all its data under /var/lib/influxdb in the container. The influxdb_data volume in docker-compose.yml stores that directory outside the container, so the data survives when the container is recreated, which happens at every image update. The influxdb_config volume holds only the InfluxDB configuration.

danger

Earlier versions of this page published a docker-compose.yml without the influxdb_data volume. A device installed from that file keeps its data inside the InfluxDB container. The next time the container is recreated, for example by docker compose up after an image update, all local data is lost, including data the Syncer has not uploaded yet.

If your docker-compose.yml has no line influxdb_data:/var/lib/influxdb, copy the data out before you change anything:

  1. Stop the services that write to InfluxDB: docker compose stop collector analytics syncer
  2. Copy the data out of the container: docker cp influxdb:/var/lib/influxdb ./influxdb-backup
  3. Replace your docker-compose.yml with the one below.
  4. Recreate the InfluxDB container with the new volume, without starting it: docker compose up --no-start influxdb
  5. Copy the data into the new volume: docker cp ./influxdb-backup/. influxdb:/var/lib/influxdb
  6. Start everything again: docker compose up -d

docker-compose.yml​

This is the docker-compose.yml that ships with Capture Edge.

# Set the environment variable CAPTURE_DOCKER_TAG to use a different tag than 'latest'.
# Example with sudo: sudo CAPTURE_DOCKER_TAG=develop docker compose up -d

version: '3.4'

services:
cloudmanager:
image: harbor.mgmt.vintecc.cloud/capture-edge/cloudmanager:${CAPTURE_DOCKER_TAG:-latest}
container_name: cloudmanager
ports:
- '5004:5004'
volumes:
- capture_etc:/etc/capture
- capture_ca_certs:/usr/local/share/ca-certificates/
privileged: true
environment:
- IS_RUNNING_IN_DOCKER=true
# - CAPTURE_COMPANY=YourCompany
# - CAPTURE_SERVER_BASE_URL=http://1.2.3.4
restart: always

syncer:
image: harbor.mgmt.vintecc.cloud/capture-edge/syncer:${CAPTURE_DOCKER_TAG:-latest}
container_name: syncer
ports:
- '5001:5001'
volumes:
- capture_etc:/etc/capture
- capture_ca_certs:/usr/local/share/ca-certificates/
environment:
- IS_RUNNING_IN_DOCKER=true
depends_on:
- cloudmanager
restart: always

collector:
image: harbor.mgmt.vintecc.cloud/capture-edge/collector:${CAPTURE_DOCKER_TAG:-latest}
container_name: collector
ports:
- '5002:5002'
volumes:
- capture_etc:/etc/capture
environment:
- IS_RUNNING_IN_DOCKER=true
depends_on:
- cloudmanager
restart: always

analytics:
image: harbor.mgmt.vintecc.cloud/capture-edge/analytics:${CAPTURE_DOCKER_TAG:-latest}
container_name: analytics
ports:
- '5003:5003'
volumes:
- capture_etc:/etc/capture
environment:
- IS_RUNNING_IN_DOCKER=true
depends_on:
- cloudmanager
restart: always

influxdb:
image: "influxdb:1.8.10"
container_name: influxdb
ports:
- "8086:8086"
- "8088:8088"
volumes:
- influxdb_data:/var/lib/influxdb
- influxdb_config:/etc/influxdb/
environment:
- IS_RUNNING_IN_DOCKER=true
restart: always

# redis:
# image: redis:6.2-alpine # Minimum installation
# image: harbor.mgmt.vintecc.cloud/vintecc/redis:7.2.0-v6 # Including extensions like RedisJSON
# container_name: redis
# ports:
# - '6380:6379'
# command: redis-server --maxmemory 1024mb --maxmemory-policy allkeys-lru --loglevel warning
# restart: always

volumes:
capture_etc:
capture_ca_certs:
influxdb_data:
influxdb_config:
interact-data:
redis-data: