This is an automated email from the ASF dual-hosted git repository.

omalley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/master by this push:
     new a954681  ORC-566: Add docker file for building site.
a954681 is described below

commit a9546819591b7b97bae6ddd65a17971bb1e12fb8
Author: Owen O'Malley <[email protected]>
AuthorDate: Tue Oct 29 15:12:17 2019 -0700

    ORC-566: Add docker file for building site.
    
    Fixes #446
    
    Signed-off-by: Owen O'Malley <[email protected]>
---
 site/.dockerignore       |  5 +++++
 site/Dockerfile          | 51 ++++++++++++++++++++++++++++++++++++++++++++++++
 site/README.md           | 32 ++++++++++++++++++------------
 site/_config.yml         |  3 ++-
 site/_sass/_gridism.scss |  4 ++--
 5 files changed, 80 insertions(+), 15 deletions(-)

diff --git a/site/.dockerignore b/site/.dockerignore
new file mode 100644
index 0000000..5f1a8f9
--- /dev/null
+++ b/site/.dockerignore
@@ -0,0 +1,5 @@
+.sass-cache
+*~
+Dockerfile
+Gemfile.lock
+target
diff --git a/site/Dockerfile b/site/Dockerfile
new file mode 100644
index 0000000..e0bc70f
--- /dev/null
+++ b/site/Dockerfile
@@ -0,0 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# ORC site builder
+#
+
+FROM ubuntu:18.04
+MAINTAINER ORC team <[email protected]>
+
+RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
+RUN apt-get update
+RUN apt-get install -y \
+  g++ \
+  gcc \
+  git \
+  libssl-dev \
+  libz-dev \
+  make \
+  ruby-dev \
+  rubygems \
+  tzdata
+RUN gem install \
+  bundler \
+  liquid \
+  listen \
+  rouge
+RUN gem install jekyll -v 3.8.6
+RUN gem install github-pages
+
+RUN useradd -ms /bin/bash orc
+COPY . /home/orc/site
+RUN chown -R orc:orc /home/orc
+USER orc
+WORKDIR /home/orc/site
+
+EXPOSE 4000
+CMD bundle exec jekyll serve -H 0.0.0.0
+
diff --git a/site/README.md b/site/README.md
index 61b742b..53b155d 100644
--- a/site/README.md
+++ b/site/README.md
@@ -1,26 +1,34 @@
 # Apache ORC docs site
 
 This directory contains the code for the Apache ORC web site,
-[orc.apache.org](https://orc.apache.org/).
+[orc.apache.org](https://orc.apache.org/). The easiest way to build
+the site is to use docker to use a standard environment.
 
 ## Setup
 
 1. `cd site`
 2. `git clone https://gitbox.apache.org/repos/asf/orc.git -b asf-site target`
-3. `sudo gem install bundler`
-4. `sudo gem install github-pages jekyll`
-4. `bundle install`
 
-## Running locally
+## Run the docker container with the preview of the site.
 
-You can preview your contributions before opening a pull request by running 
from within the directory:
+1. `docker build -t orc-site .`
+2. `docker run -d -p 4000:4000 orc-site`
 
-1. `bundle exec jekyll serve`
+## Browsing
+
+Look at the site by navigating to
+[http://0.0.0.0:4000/](http://0.0.0.0:4000/) .
 
 ## Pushing to site
 
-1. `cd site/target`
-2. `git status`
-3. You'll need to `git add` any new files
-4. `git commit -a`
-5. `git push origin asf-site`
\ No newline at end of file
+You'll copy the files from the container to the site/target directory and
+commit those to the asf-site branch.
+
+1. Find the name of the container using `docker ps`.
+2. `docker cp $CONTAINER:/home/orc/site/target .`
+3. `cd target`
+4. Commit the files and push to Apache.
+
+## Shutting down the docker container
+
+1. `docker stop $CONTAINER`
\ No newline at end of file
diff --git a/site/_config.yml b/site/_config.yml
index b091925..b59b21b 100644
--- a/site/_config.yml
+++ b/site/_config.yml
@@ -2,6 +2,7 @@ markdown: kramdown
 highlighter: rouge
 permalink: /news/:year/:month/:day/:title/
 excerpt_separator: ""
+encoding: utf-8
 
 repository: https://github.com/apache/orc
 jira: https://issues.apache.org/jira/browse
@@ -10,7 +11,7 @@ dist_mirror: https://www.apache.org/dyn/closer.cgi/orc
 tag_url: https://github.com/apache/orc/releases/tag/rel
 dist_archive: https://archive.apache.org/dist/orc
 destination: target
-exclude: [README.md, Gemfile*]
+exclude: [README.md, Gemfile*, Dockerfile]
 keep_files: [.git]
 highlight_color: "#67cf56"
 
diff --git a/site/_sass/_gridism.scss b/site/_sass/_gridism.scss
index 61698ef..11a4d16 100644
--- a/site/_sass/_gridism.scss
+++ b/site/_sass/_gridism.scss
@@ -27,7 +27,7 @@
 .grid .unit:first-child { padding-left: 20px; }
 .grid .unit:last-child { padding-right: 20px; }
 
-/* Nested grids already have padding though, so let’s nuke it */
+/* Nested grids already have padding though, so let's nuke it */
 .unit .unit:first-child { padding-left: 0; }
 .unit .unit:last-child { padding-right: 0; }
 .unit .grid:first-child > .unit { padding-top: 0; }
@@ -93,7 +93,7 @@
 
 /* Responsive Stuff */
 @media screen and (max-width: 568px) {
-  /* Stack anything that isn’t full-width on smaller screens 
+  /* Stack anything that isn't full-width on smaller screens 
      and doesn't provide the no-stacking-on-mobiles class */
   .grid:not(.no-stacking-on-mobiles) > .unit {
     width: 100% !important;

Reply via email to