Docker image not preserving changes

Hi everyone,
I have made some modifications to the database.sql and code_types.php. However, when I build the new image utilizing the default dockerfile (cloning from my Github repo) and the “production” docker-compose.yml file, my changes to the images are not present. With that being said, I can see my changes utilizing the Flex image (development-easy). It appears the dockerfile build process is replacing the database.sql and code_types.php. Any help would be greatly appreciated!

are you pointing to your image in the docker-compose.yml?

Hi Stephen,
Thanks for the prompt response. Yes, I am.

ok, so sounds like the build of your custom image didn’t capture these customizations.

were you able to successfully build the image in this post?

No. I wasn’t able to build the image from the local source code. I put that on hold for now. I am hoping that stepping away for a few days will open some new doors :blush:. It keeps telling me that the `…/src/openemr
path cannot be found. I made sure to use the correct relative path (from my
dockerfile).

sounds like the build of your custom image didn’t capture these customizations
I’ve tried several times and the customizations aren’t showing up

you can use an absolute path instead of the relative path, not sure about windows preferences for that but something like the below

rsync --recursive --exclude .git /Dev/openemr/src/openemr

Ok. I will give it a shot. Thanks, Stephen.

looks like that’s not going to work either, we need to use the docker COPY command

What would that look like based on my directory structure depicted earlier in our conversation?

Hey! There is at least one reason to celebrate. I was able to build the customized image successfully by cleaning the dev environment with docker system prune -a. I suspected that some of the “dangling” images were getting in the way.

Nice, I updated the example Dockerfile which should work if you have your copy of openemr in the directory where you build your image.

Awesome! Thanks, Stephen. I will give it a shot.

2x2. I was able to build the image from the local repo. Sometimes you just have to step away and talk to the right person :smiley:. Thank you so much, Stephen.

1 Like