Skip to content

Commit

Permalink
Initial import of daemon Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWolla committed Mar 13, 2024
1 parent e56dbd3 commit e8637ec
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
36 changes: 36 additions & 0 deletions daemon/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM debian:bookworm-slim

RUN set -eux; \
groupadd -r tideways; \
useradd -r -g tideways tideways

RUN set -eux; \
export DEBIAN_FRONTEND="noninteractive"; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
; \
rm -rf /var/lib/apt/lists/*

COPY tideways.asc /usr/share/keyrings/tideways.asc

COPY --chmod=0755 docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]

ENV TIDEWAYS_DAEMON_VERSION 1.8.42

RUN set -eux; \
export DEBIAN_FRONTEND="noninteractive"; \
echo 'deb [signed-by=/usr/share/keyrings/tideways.asc] https://packages.tideways.com/apt-packages-main any-version main' |tee /etc/apt/sources.list.d/tideways.list; \
apt-get update; \
apt-get install -y \
tideways-daemon=$TIDEWAYS_DAEMON_VERSION \
; \
rm -rf /var/lib/apt/lists/*

USER tideways

EXPOSE 9135

CMD ["tideways-daemon"]
22 changes: 22 additions & 0 deletions daemon/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -e

if [ "$#" -eq 1 ] && [ "$1" = "tideways-daemon" ]; then
TIDEWAYS_DAEMON_EXTRA=

if [ -f /etc/default/tideways-daemon ]; then
source /etc/default/tideways-daemon
fi

hostname=
# Set a readable hostname if the hostname looks like Docker's
# default hostname derived from the container ID.
if [[ "$(hostname)" =~ ^[0-9a-f]{12}$ ]]; then
hostname=--hostname=tideways-daemon
fi

set -- tideways-daemon --address="[::]:9135" $hostname $TIDEWAYS_DAEMON_EXTRA
fi

exec "$@"
42 changes: 42 additions & 0 deletions daemon/tideways.asc
Original file line number Diff line number Di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