Giter VIP home page Giter VIP logo

ipmi-server's Introduction

IPMI Docker Container for Home Assistant

Docker Image Version (latest by date) Docker Pulls GitHub last commit GitHub issues GitHub

Details of the container

IPMI Server

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.

Applications

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.

How to use

You can find full installation guide in my blog: neveroff.dev/blog/ipmi-control-in-apple-home/

Docker Compose

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

Integrating it with HomeAssistant

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.

How to build it yourself

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

ipmi-server's People

Contributors

mneveroff avatar ateodorescu avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.