-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Create folder hierarchy #105
Conversation
Regarding the naming conventions, I took inspirations from node js and openjdk. If we add more jdk versions, we might need to support older base images as well as the new ones as they come out, so this folder division seems pretty flexible. |
We are not currently doing that though, we are just using alpine, so putting the release number in doesn't make sense unless we specify a certain version of alpine. |
From my point of view, it makes sense for all the developers who need to use the docker-slave image as their base image and need to know which version of alpine they are running, so that they can check if which alpine packages and versions are available. So for me, this information is very useful. Adding a new tag, i.e. docker-slave:alpine & docker-slave:alpine3.6, is essentially free, and would just give more information to any potential user. Not to mention that this is a wide accepted practice with docker images. Nevertheless, if this is absolutely not acceptable, i will rename the folder. |
I'm not saying having the version in the directory is bad, what I am saying is that the Dockerfile itself is not referencing a specific version of the alpine image, so having a version in the directory is not correct because the version of alpine could change if the upstream alpine image changes version. We need to make sure the directory and the Dockerfile match. |
I see. In fact the Dockerfile has |
You could include that in the PR and it can be reviewed. |
I checked the docker images ids for the actual images vs the ones I replaced in the PR and they are the same. docker inspect openjdk:8-jdk-alpine --format 'Id: {{.Id}}'
Id: sha256:a3562aa0b991a80cfe8172847c8be6dbf6e46340b759c2b782f8b8be45342717
docker inspect openjdk:8-jdk-alpine3.9 --format 'Id: {{.Id}}'
Id: sha256:a3562aa0b991a80cfe8172847c8be6dbf6e46340b759c2b782f8b8be45342717
docker inspect openjdk:8-jdk --format 'Id: {{.Id}}'
Id: sha256:8c6851b1fc095a57b5bbf874261db7c7471730257128121efc60942aa44571ea
docker inspect openjdk:8-jdk-stretch --format 'Id: {{.Id}}'
Id: sha256:8c6851b1fc095a57b5bbf874261db7c7471730257128121efc60942aa44571ea
docker inspect openjdk:11-jdk --format 'Id: {{.Id}}'
Id: sha256:612d4d483eeea77ddc53efefaf85d4c82748768afd1ad576443b622a919614be
docker inspect openjdk:11-jdk-stretch --format 'Id: {{.Id}}'
Id: sha256:612d4d483eeea77ddc53efefaf85d4c82748768afd1ad576443b622a919614be |
Is there possibly some way that we can find the items via script rather than hard coding the tags and so forth in multiple places? If that is beyond the scope for this PR, I understand. It's just going to be painful to move from alpine3.9 to alpine4.x (hypothetically speaking). We don't necessarily always want to publish an alpine3.9 image for instance, we may want to move to the next version, but don't want to change it all over the place. Just some thoughts. |
As first point, I disagree that it would be painful, as tags are cheap and can easily generated automatically. There is no maintenance needed as once a tag (i.e. As second point, this is exactly why many versioned tags are necessary. I would like to avoid this situation:
However, if I'm using This whole situation could be avoided if I docker-slave comes out with some more tags, which will give me the choice to what to stick to:
Even in this way, the jenkinsci team is pretty much free to do any major update in every single variable (base OS, jdk or remoting) without any disruption for the users (clearly, only if they don't use The changes in this PR allow the repository to move forward in this direction. I agree that there might be better ways to automatically generate tags (i.e. like with stackbrew for official images), but this can come later on. |
The difficulty is not in the tagging, it is in making sure all the places that |
Ok. I fail to understand your concerns, so I guess we can only agree to disagree on this point. From my side, this PR is complete; I pushed some more changes in the Makefile so that it would build correctly (the previous build timed out) and to give examples of which tags I'd like to have for this image. I understand that the real docker-slave images are not build via that Makefile anyways. If the jenkinsci team don't agree with my changes, then closing this PR is also an option. |
I think the changes are a step in a good direction, but I think we can improve upon it. I'll try and put some additional thoughts together. |
Hey @krufab and @slide, I am trying to help out here with the PRs you, @krufab, raised but there is a lot of reading to do! :) @krufab I like the idea of the While adding more tags we need to be careful of not going crazy with tag bloat. I am all for the verbose tags and having less verbose tags as you get to the more “general” tags like From my understanding as I like the idea of having folders for different Java versions we support, I think that makes things more clear. I think the I think having the folder structure go something like this would be a good solution:
For example here are a couple possible folders we might see:
I think the point @slide is getting at, is having a folder for just There is a discussion to be had if we would want to have multiple Dockerfiles for those different releases of I could see something like Adopts approach working out for us if we need more than one Dockerfile under a distros folder. For example check out, https://github.com/AdoptOpenJDK/openjdk-docker/tree/master/11/jdk/debian. |
@james-crowley Thanks for your support. |
@krufab Thanks for pointing out the Node JS repo, I saw it mentioned in your previous posts. If you take a look at the folders and the files inside, you should notice the only difference is the
If you take a second a look at the bottom on my last comment, I think there might be a better approach to the folder version. All these changes you are suggesting are good and are stuff that needs to be discussed. What works in the Node JS repo might work well for them, but might not work here. |
Merge conflict |
Signed-off-by: Fabio Kruger <krufab@gmail.com>
Signed-off-by: Fabio Kruger <krufab@gmail.com>
@oleg-nenashev, Resolved the conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use windowsservercore instead of just servercore, this follows the usage in the adoptopenjdk docker repository (and others). They use windowsservercore because that is the root name of the image from MS. nanoserver is the root name for the nanoserver image from MS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial review requests.
Signed-off-by: Fabio Kruger <krufab@gmail.com>
This PR is looking really nice. I think there are just a couple of small things to discuss and fix up and then I will approve it. Thanks for your work on this! |
Signed-off-by: Fabio Kruger <krufab@gmail.com>
Signed-off-by: Fabio Kruger <krufab@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyone else have any changes to get in before we merge? I think this looks good. There are some small changes that I might make to the Windows stuff, but that could be done after this is merged.
I will fix the DockerHub builds |
Is there a way we can get checks on the dockerhub builds somehow? |
Step 2 of issue #100 .
Moved Dockerfiles in hierarchical subfolders divided by:
Tests have slightly been adapted to print out the jdk version and base image and to build the Dockerfiles from the subfolders.
In this way will be pretty easy and clean to add new jdk versions or base images, without polluting the root folder.