lookingglass/docs/pages/installation/docker.mdx
2024-03-20 00:57:11 -04:00

54 lines
1.4 KiB
Text

---
title: Using Docker
description: Installing hyperglass with Docker
---
import { Button } from "nextra/components";
import { Callout } from "nextra-theme-docs";
## Docker
<Callout type="info">**Docker is the recommended method for running hyperglass.**</Callout>
### 1. Install Docker
<Button className="nx-my-4 nx-py-2 nx-px-4 nx-font-bold">
<a target="_blank" href="https://docs.docker.com/engine/install/">
Docker Engine Installation Guide
</a>
</Button>
### 2. Download hyperglass
```shell copy
mkdir /etc/hyperglass
cd /opt
git clone https://github.com/thatmattlove/hyperglass/tree/v2.0.0 --depth=1
```
### Optional: Quickstart
Do this if you just want to see the hyperglass page working with a fake device.
```shell copy
cp /opt/hyperglass/.samples/sample_devices.yaml /etc/hyperglass/devices.yaml
cd /opt/hyperglass
docker compose up
```
Navigate to http://localhost:8001
### 3. Create a `systemd` service
<Callout type="info">
Before you create and start the hyperglass service, you may want to verify whether or not you
intend to change any [environment variables](environment-variables.mdx) and change them first.
</Callout>
```shell copy
cp /opt/hyperglass/.samples/hyperglass-docker.service /etc/hyperglass/hyperglass.service
ln -s /etc/hyperglass/hyperglass.service /etc/systemd/system/hyperglass.service
systemctl daemon-reload
systemctl enable hyperglass
systemctl start hyperglass
```