diff --git a/Dockerfile b/Dockerfile index 8103e24..5b484c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,19 @@ FROM python:3.10 +# I add Tini for better init management. +# See https://github.com/krallin/tini +ENV TINI_VERSION v0.19.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini +RUN chmod +x /tini + ENV PYTHONUNBUFFERED=1 WORKDIR /usr/src/app COPY requirements.txt ./ - RUN pip install --no-cache-dir -r requirements.txt # The .dockerignore file only includes necessary files/folders COPY . . RUN pip install --no-cache-dir . + +ENTRYPOINT ["/tini", "--", "/usr/local/bin/samil"] diff --git a/README.md b/README.md index ceb7884..0180483 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ The image is currently not built for ARM platforms like Raspberry Pi, so for these platforms you need to build it yourself or install via pip. ``` -docker run --network host mhvis/samil samil monitor +docker run --network host mhvis/samil monitor ``` Here is a sample `compose.yaml`: @@ -51,7 +51,7 @@ name: "samil" services: samil: image: mhvis/samil - command: samil monitor # Adapt as desired + command: monitor # Adapt as desired network_mode: host restart: unless-stopped ```