-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a proper Dockerfile and natively supporting ARM images #256
Comments
I vaguely remember that once I did a release with 'mutli-arch' docker images. Something like described in this blog post: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/. It's still available on docker hub: |
Do you mean this particular multi-arch image? If so, then I don't think so, as it's not up-to-date. If you're asking "would a multi-arch image suit my needs?" Then yes, that's exactly what I'm looking for. Some naïve perusing of the |
The latter one, in general :) |
Is the build process for JATOS documented somewhere? (I see a reference to Furthermore, are you open to using GitHub Workflows to build/push these? (I've set these up in the past, but since I don't see a (If you don't wanna use GitHub Workflows, should I write-up a [bash] script that allows for building/tagging/pushing?) |
So far we only use sbt for the jatos.zip and then I bundle them by hand with Java and upload the zips by hand to GitHub. For the docker images I use sbt-native-packager and push them to Docker Hub. I always wanted to further automate the build process but never found the time.
I guess GitHub Actions would be fine. But somehow I think a simple shell script would do the same job (and keep it simple). |
Okay. Cool. Do you mind walking me through the build process and/or linking some resources on how to build them? (I've never used Scala before, so I'm not sure what to do here. 😅) |
Sorry for the late reply. I tried for the last couple hours to change the build.sbt to automatically build docker in multi-arch ... and failed. But this is just an inconvenience. The docker building works and the multi-arch building can be done in a separate step. I used the following command to push a multi-arch image to Docker Hub (it's a pre-release - don't use it in production).
My docker multi-arch experience is pretty non-existent. Do you agree with this command? Can you try this image on an arm processor? Do you think we need a special build for armv8, the one you mentioned before? |
Looks correct at first glance.
Just did. It works! 🙂
I don't think so. I believe that |
Nice. So I'll do a multi-arch docker image from now on 🎉 And since we are talking about docker. What do you think about this Dockerfile? I'm using it since a while now. Maybe you see something we can improve?
|
👋 sorry for the slow reply! I forgot that I didn't answer you. 😅 So, I'm curious why the Line 33 in b5fe354
I don't see any functional reference to I saw this: Lines 192 to 204 in 9f261be
but it's unclear if declaring JATOS_SECRET in the Docker container will override the Though, of course, I concede most of these points to you, since you're the primary maintainer of this. 😅 |
You are right. It's not needed in the Dockerfile. The one in loader.sh (and loader.bat) do the job. I can't remember why I put it there - maybe I was experimenting with starting JATOS without the loader.sh. Anyway I'll remove it. Thanks for pointing this out 👍
No, it wont't. The one in the loader.sh has precedence over the one in the Dockerfile.
You are correct, this would not be a good idea and a security risk. The secret is used by the Play Framework for things like the session cookie (https://www.playframework.com/documentation/2.8.x/ApplicationSecret). Luckily it got never used, only the one in loader.sh is used. |
JATOS has multi-arch Docker images since v3.7.4, with amd64 and arm64 (https://hub.docker.com/r/jatos/jatos/tags). |
👋 Thanks for building JATOS!
I was looking around for a Dockerfile, only to find it defined in Scala. 😕 (If it were built in a traditional Dockerfile, I could've submitted a PR that adds support for ARMv8.)
https://github.com/JATOS/JATOS/blob/4466ce747ed585f56bfc298b4cb4442622ae8e71/build.sbt
I've never used Scala, but imagine it has templating to support variable changes (to reduce need for manually updating the Dockerfile).
I'm happy to contribute a Dockerfile/whatnot to support this – but wanted to open an issue to check if that's something JATOS is open to. 🙂
The text was updated successfully, but these errors were encountered: