kiranshila / Doplarr

An *arr request bot for Discord
MIT License
407 stars 30 forks source link

Doplarr Arm64 supported docker image #138

Closed AvihaiZiv closed 2 months ago

AvihaiZiv commented 2 months ago

with this Dockerfile you should be able to use docker buildx to build multi-arch image (amd64/arm64),

I also added the build of the jar inside the dockerfile, feel free to remove it you deem it unneeded, i think it could add a value though. overall image size went up a by 20mb or so, nothing dramatic. Closes #137

kiranshila commented 2 months ago

Looks great! Did you test it out? I think the CMD path may be wrong because there's no app dir anymore, right?

AvihaiZiv commented 2 months ago

Looks great! Did you test it out? I think the CMD path may be wrong because there's no app dir anymore, right?

Yes it works fine, there is still /app dir, As WORKDIR creates the folder and cd to it

kiranshila commented 2 months ago

Ah great! Thanks for you help!

kiranshila commented 2 months ago

Look like some things didn't work in CI, I'll take a look more closely tomorrow.

AvihaiZiv commented 2 months ago

if it helps, I ran the the docker build from the root of the project, with this command docker build . -f docker/Dockerfile -t \<image>:\<tag>

Also for multiarch build You need to use docker buildx as it can emulate the arm64 env

you will need to setup a build container first

with:

docker buildx create --use

Afterwards you can build the multiarch image like so:

docker buildx build . -f docker/Dockerfile --platform linux/amd64,linux/arm64 -t \<image>:\<tag> --push