-
-
Notifications
You must be signed in to change notification settings - Fork 166
Docker updates for WW 2.17: ADDITIONAL_BASE_IMAGE_PACKAGES and updated OPL metadata download approach #1722
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
Docker updates for WW 2.17: ADDITIONAL_BASE_IMAGE_PACKAGES and updated OPL metadata download approach #1722
Conversation
taniwallach
commented
Jun 10, 2022
- Modify the approach Docker uses to get the OPL metadata - to use the new approach.
- Add a new feature to make it possible to use a new build time argument to add additional packages to the stage 1 (OS) image so which is more efficient that adding them each time a container is started.
add additional base OS packages to the stage 1 image by setting ADDITIONAL_BASE_IMAGE_PACKAGES on the "docker build" command line, without needed to edit DockerfileStage1 locally. Explain about this is docker-compose.yml and also explain there about when to use the "--no-cache" option.
using an environment variable. (Needed for Docker.) Modify docker-entrypoint.sh to use the new bin/OPL-update to get the metadata when needed.
|
@mgage - The idea of the |
|
I haven't tested this yet, but the general concept of the things done here looks good. I will try to do some testing this weekend. |
|
For testing the OPL metadata feature without building a new image:
Forcing an existing container to download the metadata from GitHub (on the next startup) can be done by starting a shell in the running container so that the next When |
|
I brought up my development server (docker based) with a branch on this PR and what was then an up-to-date WW 2.17 using the branch https://github.com/taniwallach/webwork2/tree/WW217-with-PR-1722 . Updating an existing OPL volumeI found it convenient to update the OPL git settings before building the Docker images, etc. as I have an existing storage volume with the OPL: It would be a cleaner test to use a different name for the OPL volume in Building a WW 2.17 image with the changes in this PRSomething like the following should probably work (sorry, my Docker setup for production has lots of customization in it, SSL settings, a special location for the Pick what extra packages to install below. I used
Testing the OPL-update changesNext steps relevant if there was an exiting OPL volume which prevented docker-entrypoint.sh from doing the OPL-update. |
drgrice1
left a comment
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.
This looks good. One minor detail with a couple of unneeded lines.
|
I successfully rebuilt my course using tani's branch WW217-with-PR-1722 I couldn't find the script Perhaps I was supposed to rebuild one of the volumes as well? |
mgage
left a comment
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 was able to build the webwork2 container from scratch including adding vim using the build-arg.
After a couple of tries I was able to rebuild the library tables. I found that starting from docker-compose build and then using docker-compose up was the easiest way for me to make sure that I was using the latest OPL-update script
|
I will merge this now. |