From 995dacf0c02d0839dd1bb6b24952f407707d922f Mon Sep 17 00:00:00 2001 From: Dan Trickey Date: Wed, 21 Jun 2023 21:51:42 +0100 Subject: [PATCH] docker: Remove poetry from container --- .dockerignore | 4 ++++ Dockerfile | 15 +++++++++++++ .../docker-compose.yml => docker-compose.yml | 0 docker/Dockerfile | 22 ------------------- 4 files changed, 19 insertions(+), 22 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile rename docker/docker-compose.yml => docker-compose.yml (100%) delete mode 100644 docker/Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..898d2bc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +.github +Dockerfile* +docker-compose* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d543ba4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# syntax = docker/dockerfile:1.0-experimental + +FROM python:3.11-slim + +RUN pip install --upgrade pip + +COPY . /hue2mqtt-python + +WORKDIR /hue2mqtt-python + +RUN pip install . + +VOLUME [ "./hue2mqtt.toml" ] + +CMD ["hue2mqtt"] diff --git a/docker/docker-compose.yml b/docker-compose.yml similarity index 100% rename from docker/docker-compose.yml rename to docker-compose.yml diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index b20677b..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# syntax = docker/dockerfile:1.0-experimental - -FROM python:3.8 - -RUN pip install --upgrade pip - -RUN git clone https://github.com/trickeydan/hue2mqtt-python.git - -WORKDIR /hue2mqtt-python - -ENV POETRY_HOME=/poetry - -RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python - -ENV PATH="/poetry/bin:${PATH}" - -RUN poetry install -vvv --no-ansi - -VOLUME [ "/hue2mqtt-python/hue2mqtt.toml" ] - -ENTRYPOINT ["poetry"] -CMD ["run", "hue2mqtt"]