ddanielr commented on code in PR #384: URL: https://github.com/apache/accumulo-website/pull/384#discussion_r1175925626
########## Dockerfile: ########## @@ -0,0 +1,30 @@ +FROM ruby:2.7.8-slim-bullseye as base + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + git \ + curl \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /site + +COPY Gemfile /site/Gemfile +COPY Gemfile.lock /site/Gemfile.lock Review Comment: They are being copied so that the `RUN` command on line 13 can execute the `bundle install` and install all the ruby dependencies in the container image. This is done for repeatability and render speed. The docker image is not attempting software installs as part of the render operation at runtime so we can guarantee that there are no render differences between machines, ensuring repeatable results. Likewise, the render operation is the ONLY thing the container has to do, so it's quite fast and allows developers to work at speed. There's also an added benefit that any gem updates with dependency issues should trigger failures in the docker build stage vs throwing an error during the render stage. This usage pattern is also laid out in the "How to use this image" section for the [base ruby image](https://hub.docker.com/_/ruby) -- 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]
