1 building
MassiveBox edited this page 2024-04-19 17:18:58 +02:00

👷 Building EcoDash

Here's how to build EcoDash in both binaries and as a Docker container. This is not necessary for most cases - we provide both pre-built binaries and containers for Linux ARM and x86_64 - however in devices with unsupported architectures it's necessary.

You're encouraged to first check the installation instructions to see if a pre-built container or binary is already available.
If you really have to build it yourself, we recommend you Docker over binaries.

Setup

  1. Download Git for your operating system from https://git-scm.com/download or from your package manager (it's nearly always called git)
  2. Clone the repository by running git clone https://git.massivebox.net/massivebox/ecodash.git inside a command prompt
  3. Switch to the project directory with cd ecodash
  4. If you want to build the latest stable release (recommended), use git tag to list all the available release version, then git checkout VERSION where VERSION is the highest available release as listed by git tag.

Binaries

  1. Download the Go Compiler from https://go.dev/dl/ or from your package manager (it's usually called go or golang)
  2. Download golangci-lint from https://golangci-lint.run/ (optional)
  3. Run golangci-lint run to lint all project files (optional)
  4. Build with go build src/main/main.go -o ecodash. This will generate an executable, ecodash or ecodash.exe if you're in Windows, in the same directory.

Docker

  1. Download and install Docker Engine (recommended) or Docker Desktop from https://www.docker.com/ or from your package manager (it's nearly always called docker)
  2. Run docker build . -t git.massivebox.net/massivebox/ecodash. This will build the image and tag it as git.massivebox.net/massivebox/ecodash:latest, which allows you to use the image according to the documentation.