ddanielr commented on code in PR #384:
URL: https://github.com/apache/accumulo-website/pull/384#discussion_r1175980499


##########
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.
+
+This provides the ability to immediately review rendered content changes.
+
+```bash
+docker run -d -v "$PWD":/site -p 4000:4000 webdev
+```
+
+Shell access can be obtained by overriding the default container command.
+
+This is useful for adding new gems, or modifying the Gemfile.lock for updating
+existing dependencies.
+
+```bash
+docker run -v "$PWD":/site -it webdev /bin/bash
+```
+
+Mounting the local directory as a volume is recommended to ensure that Gemfile 
and
+Gemfile.lock stay updated with any dependency changes.

Review Comment:
   Yes the mounting is being done by the `-v` option. 
   Line 131 should be the exact command someone needs to run to render their 
changes locally with the container. 
   
   Mount is a bit more verbose with the only requirement that the target 
directory must exist prior to the mount operation while `-v` has no such 
requirement. Since we control the creation of the container, we would just need 
to create the target directories as part of our build steps. 
   
    If we swapped the commands out, the new one would look like this: 
   ` docker run -d --mount type=bind,source="$pwd",target=/site -p 4000:4000 
webdev`
   vs `docker run -d -v "$pwd":/site -p 4000:4000 webdev`
   
   Personally I prefer the shorthand command, but I'll defer if  using 
`--mount` helps relate things together. 



-- 
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]

Reply via email to