waha
waha copied to clipboard
Reduce the docker image
Hi is it possible to reduce the docker image size. I see that it is 1.92GB for arm .Can we use alpine image instead of bullseye and also reducing the number of layers make the image small. Better to have different images for noweb and webjs. Just a suggestion . Awesome project btw :)
REPOSITORY TAG IMAGE ID CREATED SIZE
devlikeapro/whatsapp-http-api arm 40ff15031379 11 days ago 1.92GB
+1 @sunilsankar @allburov Using scratch or alpine + using docker-slim to further squeeze the image size.
Hi! Great idea, I'm facing the problem with the image size while using 3G mobile internet :D
I'd love to keep the original and latest image as debian based and "all inclusive" tho.
For the start we could create these images (it'll reduce about 500MB memory that chromium uses)
devlikepro/whatsapp-http-api:latest- Debian, all installeddevlikepro/whatsapp-http-api:slim- Debian, no chromiumdevlikepro/whatsapp-http-api:arm- Debian ARM, all installeddevlikepro/whatsapp-http-api:arm-slim- debian ARM, all installed
In the next step we could try to use alpine (I'm skeptical about docker-slim...) and create a bit more images
devlikepro/whatsapp-http-api:alpine- Debian, all installeddevlikepro/whatsapp-http-api:alpine-slim- alpine, no chromiumdevlikepro/whatsapp-http-api:arm-alpine- alpine ARM, all installeddevlikepro/whatsapp-http-api:arm-alpine-slim- debian ARM, all installed
8 images... If there's anyone who could contribute to the project so we can have 2 Dockerfiles for that Dockerfile and Dockerfile.alpine - it'd be great :pray:
I'd start with the first step - separating chrome\no-chrome builds For "with chromium" and "no chromium" we could use multi stage builds so we don't have to maintain 4 Dockerfiles and keep them in sync...
I will try to contribute @allburov
Hi! I've added 3 different images - default with chromium, with chrome and no browser (for NOWEB engine) https://waha.devlike.pro/docs/how-to/engines/#docker-images
devlikeapro/whatsapp-http-api noweb 1.49GB
devlikeapro/whatsapp-http-api chrome 2GB
devlikeapro/whatsapp-http-api latest 2.05GB
It shouldn't be hard to extend it with alpine or similar small base image using github matrix https://github.com/devlikeapro/whatsapp-http-api/blob/core/.github/workflows/build.yaml
The tags should be start with alpine in this way
alpine-latestalpine-chromealpine-noweb-arm(no chrome available for arm)
Contributions are welcome!