WeBWorK Main Forum

How update pg and OPL in Docker version of WeBWorK 2.15

Re: How update pg and OPL in Docker version of WeBWorK 2.15

by Nathan Wallach -
Number of replies: 0

Updating PG:

1. I think the "docker way" to get an updated version of PG from the main repository would to be to build a new docker image ("docker-compose build"). You could modify the Dockerfile to pull in PG from a different repository or branch, but to get it into a "fixed" Docker image, you would need to build the new image.

2. If you just want to handle local changes, you would modify docker-compose.yml to mount your local directory over what is inside the image, and then whatever is there will be used. (Most files are cached into the Apache process, so an apache restart or docker-compose down/up cycle is needed when files changed.)

-----

OPL: In the current Docker setup it is stored on a persistent storage volume, so the following should work:

docker container exec -it webwork2_app_1 bash   # Get a shell inside a running Docker container

cd libraries/webwork-open-problem-library/

git fetch

git checkout master

git pull

# Maybe also do

#          cd /opt/webwork/webwork2/ 

#            bin/OPL-update