-
Notifications
You must be signed in to change notification settings - Fork 588
[master] Docker files for Ehcache #3105
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
Conversation
| @@ -0,0 +1,31 @@ | |||
| FROM azul/zulu-openjdk-alpine:17-jre-latest | |||
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.
Should this be a reference to an immutable tag?
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.
I've asked myself the question and I think that's better to use lastest. Otherwise we are forced to put a process in place to handle the update. Latest also does not harm for a sample file or something deployed OSS I think. Anybody not happy with that could grab the code and rebuild.
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.
Note: my answer would be different when we can add later a process to generate and deploy docker image to Docker hub from gradle ;-) But for now for a sample in the kit i don't see any issue.
| @@ -0,0 +1,31 @@ | |||
| FROM azul/zulu-openjdk-alpine:17-jre-latest | |||
|
|
|||
| RUN apk update && apk upgrade && apk add bash | |||
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.
Do we need bash because of the start server script, or the entrypoint.sh?
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.
Yes to keep the content in sync as much as possible as what's done in enterprise... If a fix has to be made, easier like that.
| FROM azul/zulu-openjdk-alpine:17-jre-latest | ||
|
|
||
| RUN apk update && apk upgrade && apk add bash | ||
| RUN mkdir /terracotta && chgrp -R 0 /terracotta && chmod -R g+rX /terracotta |
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.
Would it be simpler to mirror the structure of the existing internal Docker images here?
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.
Not at all ;-)
That sag base image is breaking the basic rules about container immutability with their home dir and sagadmin perm requirements.
We have the opportunity to do things clean here and only open to group 0 and only specific RW folder for OpenShift random uid:0 support. Everything is installed as root and accessed in read-only mode by default, as it should be.
|
|
||
| EXPOSE 9410 | ||
|
|
||
| ENV DEFAULT_OFFHEAP "offheap-1:512MB,offheap-2:512MB" |
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.
Any reason we need two offheap resources by default in an Ehcache setup?
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.
I replicated the enterprise defaults. I prefer to keep them as-is because config tool and sever defaults also have 2 offheaps I think... Better to be consistent across all our maintained images.
| EXPOSE 9410 | ||
|
|
||
| ENV DEFAULT_OFFHEAP "offheap-1:512MB,offheap-2:512MB" | ||
| ENV DEFAULT_ACTIVATE "false" |
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.
Would it make sense for this to be true for OSS images?
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.
Good question... It would help users I think but... The problem is that this won't be consistent with the use of the docker image with a custom CLI (not through using env vars by tweaking the default CLI). When using CLI, the auto activate flag has to be added to auto activate.
|
Updated READMEs to add the necessary header and footer (licensing, etc) required to be deployed on hub.docker.com |
gw assemble
gw distDir
cd clustered/ehcache-clustered/build/kit/
./docker/buildAndTest.groovy |
|
This PR adds a docker folder in the Ehcache kit with instructions on how to build the 3 images, plus the README to place on Docker Hub.
ehcache-serverehcache-terracotta-serverterracotta-voter-ossehcache-terracotta-voterterracotta-config-tool-ossehcache-terracotta-config-toolNotes:
release/3.9branch can be made once mergedSome ref regarding these required perm /
uid:0with OpenShift (also others): https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelinesTO TEST:
gw assemble gw distDir cd clustered/ehcache-clustered/build/kit/ ./docker/buildAndTest.groovy