FROM        alpine:3
RUN         apk add --no-cache dumb-init=1.2.5-r3 bash=5.3.3-r1

WORKDIR     /app

ARG         TARGETARCH
ARG         TARGETVARIANT
COPY        ./etc /app/config
COPY        ./build/hamview-receiver-${TARGETARCH}${TARGETVARIANT#v} /app/hamview-receiver
COPY        ./cmd/hamview-receiver/entrypoint.sh /entrypoint.sh

ENTRYPOINT  ["dumb-init", "/entrypoint.sh"]
