Created
February 12, 2024 08:56
-
-
Save knrt10/c852dedb210febb4e260191e06acbbe4 to your computer and use it in GitHub Desktop.
Run headlamp using docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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