pushbits / server

A simple server for push notifications via Matrix (and a minimalistic alternative to Pushover and Gotify) 🚀📯
https://www.pushbits.io
ISC License
314 stars 18 forks source link

Include PushBits CLI in Docker image #60

Closed ich777 closed 1 year ago

ich777 commented 1 year ago

As discussed in #58, is it possible to include cli in the Docker image because you can then open up a container console and add applications directly from the container without going through the hassle downloading it on a physical machine or even to the container.

eikendev commented 1 year ago

I'm still thinking what's the best way to do it. Seeing two primary options:

Happy to hear your thoughts on this.

ich777 commented 1 year ago

I would pull it in from the releases tab since why build it twice when it's already in place.

Something like this in the Dockerfile should do the job just fine and cli should then be easily accessible from the docker command line:

ARG CLI_VERSION=0.0.4

RUN wget -O /tmp/cli_${CLI_VERSION}.tar.gz https://github.com/pushbits/cli/releases/download/v${CLI_VERSION}/cli_${CLI_VERSION}_linux_amd64.tar.gz && \
    tar -C /tmp -xvf /tmp/cli_${CLI_VERSION}.tar.gz && \
    cp /tmp/cli /usr/bin/cli && \
    rm -f /tmp/*
eikendev commented 1 year ago

Fixed in f739672e01c2212110924b63e1bcb2805dea2619.