markokajzer / discord-soundbot

A Soundboard Bot for Discord
MIT License
191 stars 69 forks source link

Convert Dockerfile to multi-stage build #81

Closed nstapelbroek closed 4 years ago

nstapelbroek commented 4 years ago

Hey,

As discussed a while back, here are some changes for the Docker setup that originated from #60. Now that DiscordJS is supporting Node 12 the changes are a lot less. Here's the gist:

What has been done:

nstapelbroek commented 4 years ago

I'll push a multi arch image to dockerhub so we can test the result :)

nstapelbroek commented 4 years ago

It's ready here

nstapelbroek commented 4 years ago

Tested this on a Raspberry PI 3. Seems to work 😄

HypriotOS/armv7: nico@pi3 in ~
$ docker run -e CLIENT_ID=xx -e TOKEN=xx --rm -it nstapelbroek/discord-soundbot:pr-marko
Unable to find image 'nstapelbroek/discord-soundbot:pr-marko' locally
pr-marko: Pulling from nstapelbroek/discord-soundbot
9a298b6c339c: Pull complete
291dc19fa72d: Pull complete
f9775fee1a5f: Pull complete
6a0e6624df6a: Pull complete
6219c7268a1b: Pull complete
7c2d1b1a016d: Pull complete
a6827ebd13a1: Pull complete
f7ff4b8afaab: Pull complete
d65968554353: Pull complete
55cd073b295d: Pull complete
e27234acc195: Pull complete
8b156c4ddc68: Pull complete
107604780b22: Pull complete
Digest: sha256:a51345d7867a4c590eea00150ac97b2eb1daa17e0ca4cb3bc5afc242a1e32da7
Status: Downloaded newer image for nstapelbroek/discord-soundbot:pr-marko
Use the following URL to let the bot join your server!
https://discordapp.com/oauth2/authorize?client_id=xx&scope=bot
nstapelbroek commented 4 years ago

Thanks for the swift feedback 🚀 . I'll need some time to check your suggestions as they make sense but I forgot why things ended up like that 🤔 (for example ffmpeg and the copy statement)

nstapelbroek commented 4 years ago

Fixed most of the points 🥳. I left some discussions open for you to make a decision.

markokajzer commented 4 years ago

Thanks again so much for this! I'll merge today after work and take care of any possible follow ups myself!