Skip to content

Instantly share code, notes, and snippets.

@knrt10
Created February 12, 2024 08:56
Show Gist options
  • Save knrt10/c852dedb210febb4e260191e06acbbe4 to your computer and use it in GitHub Desktop.
Save knrt10/c852dedb210febb4e260191e06acbbe4 to your computer and use it in GitHub Desktop.
Run headlamp using docker-compose
#!/bin/bash
set -euo pipefail
set -x
# Clone headlamp repository from github
git clone https://github.com/headlamp-k8s/headlamp.git --depth=1 && cd headlamp
echo '
version: "3"
services:
headlamp:
build:
context: .
dockerfile: Dockerfile
ports:
- "4466:4466"
command: ["-enable-dynamic-clusters", "-plugins-dir=/build/plugins"]
volumes:
- headlamp-plugins:/build/plugins
user: "100:101"
init: true
depends_on:
- init-container
init-container:
build:
context: .
dockerfile: Dockerfile.plugins
volumes:
- headlamp-plugins:/plugins
volumes:
headlamp-plugins:
' | tee docker-compose.yaml
# Start headlamp
docker-compose up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment