This container is a lightweight fully-fledged webserver that allows us to execute ipmitool
commands and returns a json
object with some results, courtesy of @ateodorescu and their Home Assistant Add-on, ipmi-server and uses their Symphony app and nginx configuration.
The image itself is based on the HomeAssistant Add-on, so contains a fair amount of junk, it's on my to-do to significantly reduce the size of the image whilst keeping the functionality.
This repository is provided for convenience, so people, including myself, can pull it from docker hub and wouldn't have to build it themselves.
It was initially inspired by the home-assistant-ipmi by @ateodorescu.
WARNING This container's content contains several unpatched CVEs, most notably CVE-2023-24540, CVE-2023-24538 and CVE-2022-23806 for stdlib and CVE-2023-38545 for alpine. I can't be bothered with updating the underlying home assistant add-on base image, so please isolate the container well and ensure that it's only accessible via the caddy_net.
You can find full installation guide in my blog: neveroff.dev/blog/ipmi-control-in-apple-home/
I'm assuming you're using caddy
as your reverse-proxy, but it's largely irrelevant.
This docker-compose will set up the container as is, and it will become available using http://ipmi_server:80
from any other container on the same network.
# docker-compose.yml
services:
ipmi_server:
image: mneveroff/ipmi-server:1.0.0
container_name: ipmi_server
hostname: ipmi_server
restart: unless-stopped
env_file: .env
networks:
default:
name: $DOCKER_MY_NETWORK
external: true
# .env
TZ=Europe/London
DOCKER_MY_NETWORK=caddy_net
To integrate it with HomeAssistant you can use home-assistant-ipmi by @ateodorescu. As of 1.3.1 you are be able to specify ipmi-server host, set it to ipmi_server
and your port to 80
in the configuration and it'll be available in HomeAssistant.
If you want to build this container yourself feel free to use the snippet below, replace the -tag definitions as you please. For buildx reference look here.
docker buildx build \
--platform linux/amd64 \
--build-arg BUILD_ARCH=amd64 \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg BUILD_REF=$(git rev-parse --short HEAD) \
--build-arg BUILD_VERSION=1.0.0 \
--build-arg BUILD_REPOSITORY="mneveroff/ipmi-server" \
--tag mneveroff/ipmi-server:latest \
--tag mneveroff/ipmi-server:1.0.0 \
--load .
Or to build and push:
docker buildx build \
--push \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
--build-arg BUILD_ARCH=amd64 \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg BUILD_REF=$(git rev-parse --short HEAD) \
--build-arg BUILD_VERSION=1.0.0 \
--build-arg BUILD_REPOSITORY="mneveroff/ipmi-server" \
--tag mneveroff/ipmi-server:latest \
--tag mneveroff/ipmi-server:1.0.0 .
To ensure that you can build for multiplatform you need to enable docker buildx
and create a builder with the platforms you want to build for, use docker buildx create --use
and docker buildx inspect --bootstrap
as well as make sure that your docker engine config has reference to buildkit:
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false,
"features": {
"buildkit": true
}
}
Replace the repository, and <name>
:<version>
respectively
The resulting docker container can to be used with -p 9595:80
if you want to quickly test it against localhost:9595
via docker run -p 9595:80 mneveroff/ipmi-server:latest