Skip to content

Commit

Permalink
feat(build): add a Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Oct 9, 2023
1 parent 226b90b commit 1e0bc96
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build/package/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2023 Joshua Rich <[email protected]>
#
# 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"]

0 comments on commit 1e0bc96

Please sign in to comment.