ctubbsii commented on code in PR #384: URL: https://github.com/apache/accumulo-website/pull/384#discussion_r1177180860
########## Dockerfile: ########## @@ -0,0 +1,43 @@ +# This Dockerfile builds an ruby environment for jekyll that empowers +# making updates to the accumulo website without requiring the dev +# to maintain a local ruby development environment. + +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 over the Gemfiles so that all build dependencies are installed +# during build vs at runtime. + +# Gems will be installed under GEM_HOME which is set by the ruby image. +# See https://hub.docker.com/_/ruby for details. + +COPY Gemfile /site/Gemfile +COPY Gemfile.lock /site/Gemfile.lock + +RUN gem update --system && bundle install && gem cleanup + +ENV HOST=0.0.0.0 +ENV PORT=4000 + +EXPOSE $PORT + +CMD bundle exec jekyll serve --force-polling -H $HOST -P $PORT Review Comment: ```suggestion # Configure the default command to build from the mounted repository CMD bundle exec jekyll serve --force-polling -H $HOST -P $PORT ``` ########## Dockerfile: ########## @@ -0,0 +1,43 @@ +# This Dockerfile builds an ruby environment for jekyll that empowers +# making updates to the accumulo website without requiring the dev +# to maintain a local ruby development environment. + +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 over the Gemfiles so that all build dependencies are installed +# during build vs at runtime. + +# Gems will be installed under GEM_HOME which is set by the ruby image. +# See https://hub.docker.com/_/ruby for details. + +COPY Gemfile /site/Gemfile +COPY Gemfile.lock /site/Gemfile.lock + Review Comment: ```suggestion # Copy over the Gemfiles so that all build dependencies are installed # during the docker build. At runtime, these will be available to Jekyll # from the mounted directory. But that's not available during the # docker build, so we need to copy them in to pre-install the Gems COPY Gemfile /site/Gemfile COPY Gemfile.lock /site/Gemfile.lock # Gems will be installed under GEM_HOME which is set by the ruby image. # See https://hub.docker.com/_/ruby for details. ``` -- 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]
