You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2020/06/04 07:23:03 UTC

[flink-web] branch asf-site updated: [FLINK-17926] Singleton the command used to build website using Docker

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

rmetzger pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/flink-web.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 815eaad  [FLINK-17926] Singleton the command used to build website using Docker
815eaad is described below

commit 815eaadaafcc8747678f7ea8e5f4959d0b394d8c
Author: klion26 <qc...@gmail.com>
AuthorDate: Tue May 26 16:15:07 2020 +0800

    [FLINK-17926] Singleton the command used to build website using Docker
    
    Before we can build the website using `./docker/run.sh` and the command `docker run --rm --volume="$PWD:/srv/flink-web" --expose=4000 -p 4000:4000 -it ruby:2.5 bash -c 'cd /srv/flink-web && ./build.sh -p'` (which in the the page `Contribute to the Website`).
    
    Now we remove the `./docker` directory, and using the command as the only official way to build Flink website.
    
    Also add the command to README.md, so that we can easily find it.
    
    This closes #342
---
 README.md         |  6 +++++
 docker/Dockerfile | 23 -----------------
 docker/run.sh     | 76 -------------------------------------------------------
 3 files changed, 6 insertions(+), 99 deletions(-)

diff --git a/README.md b/README.md
index 7fae4dc..51fbef1 100644
--- a/README.md
+++ b/README.md
@@ -3,3 +3,9 @@
 This repository contains the Flink website: https://flink.apache.org/.
 
 You find instructions for this repository here: https://flink.apache.org/contributing/improve-website.html.
+
+You can build the website using Docker such as below (without augmenting your host environment):
+
+```
+docker run --rm --volume="$PWD:/srv/flink-web" --expose=4000 -p 4000:4000 -it ruby:2.5 bash -c 'cd /srv/flink-web && ./build.sh -p'
+```
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100755
index c13f410..0000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-
-FROM ubuntu:18.10
-
-RUN apt-get update && \
-    apt-get install -y vim gem ruby-dev make gcc g++ python-setuptools && \
-    gem install bundler && \
-    cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime 
-
diff --git a/docker/run.sh b/docker/run.sh
deleted file mode 100755
index f8720ad..0000000
--- a/docker/run.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-set -e -x -u
-
-SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-
-export IMAGE_NAME="flink-web"
-
-pushd ${SCRIPT_DIR}
-
-docker build --rm=true -t ${IMAGE_NAME} .
-
-popd
-
-if [ "$(uname -s)" == "Linux" ]; then
-  USER_NAME=${SUDO_USER:=$USER}
-  USER_ID=$(id -u "${USER_NAME}")
-  GROUP_ID=$(id -g "${USER_NAME}")
-  LOCAL_HOME="/home/${USER_NAME}"
-else # boot2docker uid and gid
-  USER_NAME=$USER
-  USER_ID=1000
-  GROUP_ID=50
-  LOCAL_HOME="/Users/${USER_NAME}"
-fi
-
-docker build -t "${IMAGE_NAME}-${USER_NAME}" - <<UserSpecificDocker
-FROM ${IMAGE_NAME}
-RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME} && \
-  useradd -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME}
-ENV HOME /home/${USER_NAME}
-UserSpecificDocker
-
-FLINK_DOC_ROOT=${SCRIPT_DIR}/..
-
-CMD="
-echo
-echo 'Welcome to Apache Flink docs'
-echo 'To build, execute'
-echo '  ./build.sh'
-echo 'To watch and regenerate automatically'
-echo '  ./build.sh -p'
-echo 'and access http://localhost:4000'
-echo
-bash
-"
-
-pushd ${FLINK_DOC_ROOT}
-
-docker run -i -t \
-  --rm=true \
-  -w ${FLINK_DOC_ROOT} \
-  -u "${USER}" \
-  -v "${FLINK_DOC_ROOT}:${FLINK_DOC_ROOT}" \
-  -v "${LOCAL_HOME}:/home/${USER_NAME}" \
-  -p 4000:4000 \
-  ${IMAGE_NAME}-${USER_NAME} \
-  bash -c "${CMD}"
-
-popd
-