Signed-off-by: Cao Xueliang caoxl78320@163.com --- container/delimiter/Dockerfile | 11 ++++++++++- container/delimiter/build | 4 ++++ container/delimiter/start | 3 +-- 3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/container/delimiter/Dockerfile b/container/delimiter/Dockerfile index cc57320..a9ff279 100644 --- a/container/delimiter/Dockerfile +++ b/container/delimiter/Dockerfile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
-FROM alpine:3.13 +FROM alpine:scheduler-dev
RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweicloud.com%7Cg' /etc/apk/repositories && \ apk update && \ @@ -11,3 +11,12 @@ RUN sed -ri.origin 's|^https?://dl-cdn.alpinelinux.org|http://mirrors.huaweiclou RUN umask 002 && \ gem sources -r https://rubygems.org/ -a https://gems.ruby-china.com/ && \ gem install rest-client activesupport git json yaml elasticsearch faye-websocket terminal-table mail io-console + +ENV RUNTIME_DIR /c/cci/delimiter + +RUN mkdir -p $RUNTIME_DIR && \ + chown -R 1090:1090 /c + +WORKDIR $RUNTIME_DIR + +COPY --chown=1090:1090 delimiter . diff --git a/container/delimiter/build b/container/delimiter/build index 606149d..7f3108b 100755 --- a/container/delimiter/build +++ b/container/delimiter/build @@ -8,6 +8,10 @@ docker_skip_rebuild "delimiter"
load_cci_defaults
+bash $CCI_SRC/container/compile . + docker build -t delimiter .
push_image delimiter:latest + +rm delimiter diff --git a/container/delimiter/start b/container/delimiter/start index 3cff23a..9485750 100755 --- a/container/delimiter/start +++ b/container/delimiter/start @@ -32,10 +32,9 @@ cmd = %w[ -v #{DEFAULT_CONFIG_DIR}:#{DEFAULT_CONFIG_DIR}:ro -v /etc/localtime:/etc/localtime:ro -v /etc/compass-ci/register:/etc/compass-ci/register:ro - -w #{DEFAULT_CCI}/src delimiter ]
-cmd += ['sh', '-c', 'umask 002 && ruby ./delimiter.rb'] +cmd += ['sh', '-c', 'umask 002 && ./delimiter']
system(*cmd)