before: copy h5ai repo from our server /c/h5ai into image after: download h5ai repo when build container
[why] download h5ai in docker image, make build script more clean.
Signed-off-by: Liu Yinsi liuyinsi@163.com --- container/srv-http/Dockerfile | 8 ++++---- container/srv-http/build | 7 ------- 2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/container/srv-http/Dockerfile b/container/srv-http/Dockerfile index 987e40e..6564730 100644 --- a/container/srv-http/Dockerfile +++ b/container/srv-http/Dockerfile @@ -5,16 +5,16 @@ FROM alpine:3.9
ADD root /
-RUN apk add --no-cache nginx php7 php7-fpm php7-session php7-json php7-exif php7-imagick php7-gd php7-fileinfo nodejs npm \ - && mkdir /run/nginx/ \ - && mkdir /h5ai +RUN apk add --no-cache nginx php7 php7-fpm php7-session php7-json php7-exif php7-imagick php7-gd php7-fileinfo nodejs npm git \ + && mkdir /run/nginx/
RUN sed -i '/[global]/a daemonize = no' /etc/php7/php-fpm.conf RUN sed -i "s/user = nobody/user = nginx/g" /etc/php7/php-fpm.d/www.conf RUN sed -i "s/group = nobody/group = nginx/g" /etc/php7/php-fpm.d/www.conf
+RUN git clone https://gitee.com/luweitao_y/h5ai.git /h5ai + WORKDIR /h5ai -COPY h5ai /h5ai
# build h5ai package RUN npm install \ diff --git a/container/srv-http/build b/container/srv-http/build index 054e826..3a500ea 100755 --- a/container/srv-http/build +++ b/container/srv-http/build @@ -2,11 +2,4 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
-: ${H5AI_SRC:=/c/h5ai} - -cp -r $H5AI_SRC ./ - docker build -t srv-http . - -# clean h5ai folder -rm -rf ./h5ai