mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-04 13:17:50 +08:00
205b302634
* Support DS to create user and group in windows environment * Add unit test * delete combined-server config in dolphinscheduler-daemon.sh file * refactor dockerfile * modify dockerfile * modify dockerfile * 1. Modify dockerfile build script 2. Add something about how to build a docker image 3. Add a new README_zh_CN.md file for dockerfile
54 lines
2.0 KiB
Bash
54 lines
2.0 KiB
Bash
#!/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
|
|
|
|
echo "------ dolphinscheduler start - build -------"
|
|
printenv
|
|
|
|
if [ -z "${VERSION}" ]
|
|
then
|
|
echo "set default environment variable [VERSION]"
|
|
VERSION=$(cat $(pwd)/sql/soft_version)
|
|
fi
|
|
|
|
if [ "${DOCKER_REPO}x" = "x" ]
|
|
then
|
|
echo "set default environment variable [DOCKER_REPO]"
|
|
DOCKER_REPO='dolphinscheduler'
|
|
fi
|
|
|
|
echo "Version: $VERSION"
|
|
echo "Repo: $DOCKER_REPO"
|
|
|
|
echo -e "Current Directory is $(pwd)\n"
|
|
|
|
# maven package(Project Directory)
|
|
echo -e "mvn -B clean compile package -Prelease -Dmaven.test.skip=true"
|
|
mvn -B clean compile package -Prelease -Dmaven.test.skip=true
|
|
|
|
# mv dolphinscheduler-bin.tar.gz file to dockerfile directory
|
|
echo -e "mv $(pwd)/dolphinscheduler-dist/target/apache-dolphinscheduler-incubating-${VERSION}-SNAPSHOT-dolphinscheduler-bin.tar.gz $(pwd)/dockerfile/\n"
|
|
mv $(pwd)/dolphinscheduler-dist/target/apache-dolphinscheduler-incubating-${VERSION}-SNAPSHOT-dolphinscheduler-bin.tar.gz $(pwd)/dockerfile/
|
|
|
|
# docker build
|
|
echo -e "docker build --build-arg VERSION=${VERSION} -t $DOCKER_REPO:${VERSION} $(pwd)/dockerfile/\n"
|
|
docker build --build-arg VERSION=${VERSION} -t $DOCKER_REPO:${VERSION} $(pwd)/dockerfile/
|
|
|
|
echo "------ dolphinscheduler end - build -------"
|