Creating new docker images with changes


I’m following the documentation here for building a custom docker image:

I run the docker build command after I make my custom changes. This creates a custom image that I can then run on Ec2. When I run build, is it pulling the contents of the current directory (cloned reaction repo) or referencing the DockerFile in the reaction repo + changes? I am trying to figure out how to push my changes to my own private repo while also having the ability to update the reaction platform. All while maintaining the docker deployment method.


Your changes should go in a new plugin that lives as subfolder in your application’s directory. e.g. /imports/plugins/custom/. For an example, please have a look into

Your plugin’s root directory should probably be initialised as new git repository, perhaps even as git submodule – if suitable.

AFAIK, the docker build itself should be agnostic about how you organise your plugins. Just make sure it’s living in /imports/plugins/custom and your code should be drawn into the docker image without further configuration when executing docker build


Makes sense. I found a way to push the entire repo to my own personal github account while also pulling reaction changes:

$git clone url_to_reaction_repo
$git remote rename origin upstream
$git remote add origin

Then I can do the following:

Pull from reaction at anytime:
$ git pull upstream master

Pull from personal repo:
$ git pull origin master

Push to personal repo:
$ git push origin master

My question was about that and the actual building of the image. Consider the following scenario:

–I have an outdated clone of the reaction repo.
–I make some changes (add custom plugins)
–Then I build using the command in the docs: docker build --build-arg TOOL_NODE_FLAGS="–max-old-space-size=2048" -t mycustom .

Will this create an image with the current outdated reaction files? or pull the latest reaction version? I only question this because there is a DockerFile in the reaction repo with the following line: FROM reactioncommerce/base:v3.0.0 and the docker-compose contains: reactioncommerce/reaction:latest. Do either of these pre existing docker files have any affect on the build command?