diff --git a/Dockerfile b/Dockerfile index 4456a3ca0..fe66281a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,8 @@ ENV VERSION=$VERSION WORKDIR /data ADD . /data -RUN cd utils && bash -ix build.sh - +RUN cd utils && bash -xieu build.sh FROM nginx:alpine -COPY --from=stage-build /data/release/lina /opt/lina/ +COPY --from=stage-build /data/release/lina /opt/lina COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/utils/build.sh b/utils/build.sh index e5ebb35be..cf4a45641 100644 --- a/utils/build.sh +++ b/utils/build.sh @@ -16,7 +16,7 @@ function change_version() { } # 修改版本号文件 -if [[ -n ${VERSION} ]]; then +if [[ -n ${VERSION-''} ]]; then change_version || exit 2 fi