FROM alpine:latest

RUN apk add --no-cache \
    libtbb \
    xxhash-dev \
    bash \
    nano

WORKDIR /app

COPY docker/dropshell_alpine/output/dropshell /app/dropshell
RUN /bin/bash -c "mkdir -p /opt/dropshell/templates && mkdir -p /config"
COPY templates /opt/dropshell/templates
COPY src/dropshell-completion.bash /etc/bash_completion.d/

RUN /app/dropshell init /config
RUN /app/dropshell version

ENTRYPOINT ["/app/dropshell"]