ddanielr commented on code in PR #384: URL: https://github.com/apache/accumulo-website/pull/384#discussion_r1175990270
########## README.md: ########## @@ -108,6 +108,73 @@ HTML styled "just right". Jekyll will print a local URL where the site can be viewed (usually, [http://0.0.0.0:4000/](http://0.0.0.0:4000/)). +### Testing using Docker environment + +#### Build environment +A containerized development environment can be built using the local +Dockerfile. + +Run the build-images.sh script to generate the development environment and +associated images. + +```bash +./_scripts/build-images.sh +``` + +This action will produce two containers: `webdev` and `webdev-validator`. +The webdev container will execute a `jekyll serve` command with the +polling option enabled. Review Comment: Not for the base container, but it provides an easy button for tagging. If you run the validator build step separately, it will always build the first container or reference it from the cache. This is due to the fact that they are in the same Dockerfile and the `base` container is an earlier stage. This build pattern is intended to ensure that the images don't drift from each other while also minimizing the number of Dockerfiles and the ordering of disjointed image builds. I agree that the script is pretty small, but the only reason I kept the script is because we are tagging **both** images and it ensures the tagging is done correctly to minimize errors. The `--tag` option on a docker build command only applies to the last built image in a Dockerfile. That `--target` option limits the build step to only target the image declared as "base" in the Dockerfile. `docker build --target base -t "$BASE_TAG" .` If someone runs a build command without the `--target base` filter, the Dockerfile will build and tag the second image and will not tag the first image at all. Instead, that image just shows up as a docker image with no name and a SHA id. If that were to occur, the dev would have a mis-tagged validator image, **and** an base image that had no referenced tag to easily figure out what it is. Having a script to run and ensure images are tagged correctly would alleviate that issue while still allowing developers the freedom of manually running the build steps if they so chose. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
