From 1e0bc969db009642ec765d51e8e31d8da39cd3dd Mon Sep 17 00:00:00 2001 From: Joshua Rich Date: Mon, 9 Oct 2023 00:03:10 +0000 Subject: [PATCH] feat(build): add a Dockerfile --- build/package/Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 build/package/Dockerfile diff --git a/build/package/Dockerfile b/build/package/Dockerfile new file mode 100644 index 000000000..e65db8ffd --- /dev/null +++ b/build/package/Dockerfile @@ -0,0 +1,21 @@ +# Copyright (c) 2023 Joshua Rich +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +ARG server="http://localhost:8123" +ARG token +ARG version + +FROM fedora:latest + +RUN dnf -y install https://github.com/joshuar/go-hass-agent/releases/download/v$version/go-hass-agent-$version-1.x86_64.rpm + +RUN useradd -ms /bin/bash go-hass-agent -G wheel +RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/999-custom +USER go-hass-agent +WORKDIR /home/go-hass-agent +RUN go-hass-agent --terminal register --server $server --token $token + +ENTRYPOINT [ "bash" ] +CMD ["go-hass-agent","--terminal"]