#!/bin/bash set -xe cur_path="$(cd "$(dirname "$0")" && pwd -P)" cd "$cur_path"/../ #paddle production image name if [ ! -n "$1" ]; then paddle_image=paddlepaddle/paddle else paddle_image=$1 fi #paddle production image tag if [ ! -n "$2" ]; then paddle_tag=0.10.0rc2 else paddle_tag=$2 fi #paddle book image name if [ ! -n "$3" ]; then book_image=paddlepaddle/book else book_image=$3 fi #paddle book image tag if [ ! -n "$4" ]; then book_tag=latest else book_tag=$4 fi #generate docker file if [ ${USE_UBUNTU_REPO_MIRROR} ]; then update_mirror_cmd="sed 's@http:\/\/archive.ubuntu.com\/ubuntu\/@mirror:\/\/mirrors.ubuntu.com\/mirrors.txt@' -i /etc/apt/sources.list && \\" else update_mirror_cmd="\\" fi #build docker image echo "paddle_tag:"$paddle_tag echo "book_tag:"$book_tag cat > Dockerfile < COPY . /book EOF if [ -n "${http_proxy}" ]; then cat >> Dockerfile <> Dockerfile <