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
SAK-41868 Add Docker foundation #6967
Conversation
Hi David, I was working on something similar to this but my use case was for local development and quick-start demos. https://github.com/sakaicontrib/docker-sakai-builder It looks like yours is more targeted for production style deployment. Are you also coming to Open Apereo to present on this? Mine was a flash talk on building and starting Sakai in 7 minutes using this script. ;) I should have time to review this, we could probably simplify it a little bit. |
Hey Matthew, Your comment points out that I should also include the "pre-built java" version of this Dockerfile, where you configure your local Maven to put the artifacts in a directory inside the same folder as the Dockerfile so the container can be built by COPY of the artifacts. (This is how we develop in our Vagrant environments at UVA) While I did provide standalone docker examples of using the image, my focus is more on an example Docker Swarm stack. Which stems from having to talked to a lot of Docker enthusiasts (even a couple Docker Captains) that were basically unaware that Docker even had a fully functional built-in orchestration platform. And lastly, the Dockerfiles in this PR are constructed so that they can be used from Docker Hub to facilitate automated image builds. |
Great meeting and chatting with everyone at OA. And awesome lightening demo @jonespm ! I borrowed some of that concept and fleshed out a Docker Swarm development suite and added that here, and restructured things a bit into clear "dev" "build" and "deploy" sections. |
Codacy> Expressions don't expand in single quotes, use double quotes for that. Me> That's because I do not want them to do that.. fine,, I'll escape it... better?
Okay, the last 3 issues from Codacy are all: Which is exactly why I'm using single quotes, because I don't want that to expand.. |
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.
We shouldn't include jar files directly in the repo should use a maven plugin to deploy them.
Same goes for the mysql connector (also there maybe license restrictions).
Okay, removed the jars and pull them from their respective repos in the container startup script. |
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 have no other issues, would like to have Matt's review first before merging
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.
Yeah, this seems good. I can merge the work I've done which is somewhat independent of this to this directory after this is merged in. This seems more for production where-as what I was working on were basically like "aliases" for faster development. (Re-compile/deploy single modules)
A few minor improvements/future suggestions.
-
If you
mvn install
with-P mysql
in Dockerfile.source it will download the latest MySQL connector so you don't have to do that later in Dockerfile.binary. (And it looks like you're also doing this in Dockerfile.source) -
If you mvn install with the options
-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -T C1
it builds about twice as fast. -
Repeated versions and strings like MySQL version (5.1.47) should be an ARG so they're easier to change in future versions
-
A future release could use environment variables to make the builds a little more configurable (add a11y CKEditor, configure which options to deploy)
Lets create some JIRA's to get these improvements in. |
* SAK-41868 Add Docker examples * SAK-41868 Implement codacy suggestions * SAK-41868 Implement codacy suggestions for automated * SAK-41868 Use secrets module for Sakai + Mysql example * SAK-41868 Fix a port mapping * SAK-41868 Add development examples, and restructure exmaples * SAK-41868 Remove dnagling Vagrantfile * SAK-41868 Fix css for codacy * SAK-41868 Use generic local image in example * SAK-41868 Tweaks from codacy * SAK-41868 Tweaks from codacy Codacy> Expressions don't expand in single quotes, use double quotes for that. Me> That's because I do not want them to do that.. fine,, I'll escape it... better? * SAK-41868 Tweaks from codacy, when all else fails.. escape all the things.. * Update README.md * Update README.md * SAK-41868 Remove static jars * SAK-41868 Add an image builder example to dev context, fix a port mapping * SAK-41868 Codacy tweaks * SAK-41868 Clean up deployment example Sakai configuration * SAK-41868 Use example Docker Secrets configuration for minimal stack
Features