我在使用云效自定义构建环境的遇到镜象安装的命令找不到的问题,请各位使用过的大神指点下,以下是我的release文件,markdown的样式有些问题,请大家选择文字方可看见。
# 请参考 https://help.aliyun.com/document_detail/59293.html 了解更多关于release文件的编写方式
code.language = scripts
# 构建镜像地址
build.image=registry.cn-shenzhen.aliyuncs.com/kstudio/utils-docker@sha256:681a2864052e3f68ee898be72d59358f08c95b23187d652c92330920d769d121
build.command=sh aliyun-deploy.sh
在自定义的镜像kstudio/utils-docker
中已经安装了docker命令,并在release文件中按要求预值了镜像地址在build.image
中,但进行构建的时候环境找不到docker命令,我猜是根本没有应用上自定义的构建环境,请各位指教一下用法,docker只是一个例子,测试过svn,git,ftp等自己安装的命令全部都不行。
[optionsBuild begins at 2019-05-15 11:11:05.751]
ssh -o ConnectTimeout=3 -o PasswordAuthentication=no -o NumberOfPasswordPrompts=0 admin@10.0.0.195 'sh /home/admin/tmp_shell/aOnE-11.193.75.64-062eadbf-1ba4-4119-9ab0-b0130ba83f2e-optionsBuild.sh'
checkouting git
Already up to date.
checkout_cmd_spend:518ms
reset packages
removed directory: ‘/home/admin/64_20190510155127718_27825473_code/packages/docker-images’
--scanStart
scanEnd--
scan_spend:26ms
findrelease_spend:35ms
[INFO] build image is: registry.cn-beijing.aliyuncs.com/rdc-builds/base:1.0
[INFO] create container with registry.cn-beijing.aliyuncs.com/rdc-builds/base:1.0
[INFO] already runing an container for this build id is: adabceb829e1,recreate it
bec617b92738e55b5f5acbc4ba11185e3c3c553335837c758ce7a97352a1b452
[INFO] ===========================================begin build===========================================
[INFO] analysis arguments and release file information
[INFO] find files for docker-images.release from /home/admin/64_20190510155127718_27825473_code/docker-images__69998
[INFO] release files: ['/home/admin/64_20190510155127718_27825473_code/docker-images__69998/docker-images.release']
[INFO] use release file: ['/home/admin/64_20190510155127718_27825473_code/docker-images__69998/docker-images.release']
[INFO] reading release config from /home/admin/64_20190510155127718_27825473_code/docker-images__69998/docker-images.release
[INFO] export PYTHON='/usr/alibaba/install/python-3.5.0/bin/python3'
[INFO] export BUILD_IMAGE='registry.cn-shenzhen.aliyuncs.com/kstudio/utils-docker@sha256:681a2864052e3f68ee898be72d59358f08c95b23187d652c92330920d769d121'
[INFO] export EMPLOYEE_ID='aliyun_1036348'
[INFO] export JAVA_HOME='jdk-1.7'
[INFO] export CODE_LANGUAGE='scripts'
[INFO] export BUILD_COMMAND='sh aliyun-deploy.sh'
[INFO] export BUILD_VERSION='0.0.1'
[INFO] export TIMESTAMP='20190515111110'
[INFO] export PIPELINE_ID='50365'
[INFO] export PROJECT_ID='253001'
[INFO] export WORK_ROOT_PATH='/home/admin/64_20190510155127718_27825473_code'
[INFO] export M2_HOME='maven3.2.5'
[INFO] export CODE_INFO='[{"appId":104367,"appType":"APP","branch":"git@gitee.com:kinfen/docker-utils-images.git master","revision":"040f651776b2316deb359513ffa0237a8b1e0684"}]'
[INFO] export PACKAGE_PATH='/home/admin/64_20190510155127718_27825473_code/packages/docker-images'
[INFO] export DOCKER_PASSWD='******'
[INFO] export RELATIVE_DIR='docker-images__69998'
[INFO] export BUILD_CACHE_ENABLE='True'
[INFO] export BUILD_RCFG='/home/admin/64_20190510155127718_27825473_code/docker-images__69998/docker-images.release'
[INFO] export DOCKER_USER='cr_temp_user'
[INFO] export DOCKER_REPO='registry.cn-shenzhen.aliyuncs.com/kstudio/${PACKAGE_LABEL}'
[INFO] export SCRIPT_ROOT_PATH='/home/admin/64_20190510155127718_27825473_code/cmd'
[INFO] export SECURITY_CONFIG_URL_PASSWD='******'
[INFO] export VERSION='[{"appId":104367,"appType":"APP","branch":"master","buildNumber":"R2248729M020190515111058910485","major":0,"minor":0,"revision":1,"versionNumber":"0.0.1"}]'
[INFO] export BUILD_JOB_ID='27858201'
[INFO] export GOPATH='/home/admin/64_20190510155127718_27825473_code/docker-images__69998'
[INFO] export CODE_BRANCH='master'
[INFO] export MVN_LOCAL_REPO='/home/admin/64_20190510155127718_27825473_code'
[INFO] export APP_NAME='docker-images'
[INFO] export BUILD_NUMBER='22'
[INFO] export PACKAGE_TYPE='app'
[INFO] export EXTRA_ENVS='{"BUILD_NUMBER":"22","CODE_INFO":"[{\"appId\":104367,\"appType\":\"APP\",\"branch\":\"git@gitee.com:kinfen/docker-utils-images.git master\",\"revision\":\"040f651776b2316deb359513ffa0237a8b1e0684\"}]","EMPLOYEE_ID":"aliyun_1036348","PIPELINE_CONFIG_ID":"","PIPELINE_ID":"50365","PROJECT_ID":"253001","VERSION":"[{\"appId\":104367,\"appType\":\"APP\",\"branch\":\"master\",\"buildNumber\":\"R2248729M020190515111058910485\",\"major\":0,\"minor\":0,\"revision\":1,\"versionNumber\":\"0.0.1\"}]"}'
[INFO] export DOCKER_TAG='latest'
[INFO] export PIPELINE_CONFIG_ID='None'
[INFO] export BUILD_WORK_PATH='/home/admin/64_20190510155127718_27825473_code/docker-images__69998'
[INFO] export BUILD_CACHE_PATH='/home/admin/64_20190510155127718_27825473_code/cache'
[INFO] export PATH='.:/usr/alibaba/install/python-3.5.0/bin/python3:/usr/alibaba/install/python-3.5.0/bin/python3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[INFO] export REGION_ID='69998'
[INFO] export IS_NEED_UPLOAD_PACKAGE='false'
[INFO] export mvn_local_repo='/home/admin/64_20190510155127718_27825473_code'
[INFO] export LANG='en_US.UTF-8'
[INFO] export PYTHON_HOME='/usr/alibaba/install/python-3.5.0/bin/python3'
[INFO] export PACKAGE_LABEL='utils-baseimage'
[INFO] export DOCKER_FILE='${PACKAGE_LABEL}/Dockerfile'
[INFO] this is scripts build
[INFO] try getting security config file
[INFO] /home/admin/64_20190510155127718_27825473_code/docker-images__69998/rdc_security_config.properties is downloaded in your root path
[INFO] customized command is: sh aliyun-deploy.sh
[INFO] run: sh aliyun-deploy.sh
ready to login docker
aliyun-deploy.sh: line 3: docker: command not found
build-yun.sh: line 22: docker: command not found
push-yun.sh: line 23: docker: command not found
[ERROR] sh aliyun-deploy.sh execute failed
[ERROR] command failed exit with (127)
[ERROR] =================================================================================================
[ERROR] StartTime: 2019-05-15 11:11:10
[ERROR] BuildStatus: failed
[ERROR] ErrorType: system_error
[ERROR] ErrorReason: command failed exit
[ERROR] FixSuggest: please see log carefully and check the error
[ERROR] 您还可以按照 https://help.aliyun.com/document_detail/60101.html#debug 的指示进行本地调试。
[ERROR] EndTime: 2019-05-15 11:11:10
[ERROR] ==========================================2019-05-15 11:11:10 end==========================================
[ERROR] BUILD ERROR
build_spend:4124ms
afterbuild_spend:6ms
[optionsBuild ends at 2019-05-15 11:11:11.147]
在自定义的镜像kstudio/utils-docker中已经安装了docker命令,并在release文件中按要求预值了镜像地址在build.image中,但进行构建的时候环境找不到docker命令,我猜是根本没有应用上自定义的构建环境,请各位指教一下用法,docker只是一个例子,测试过svn,git,ftp等自己安装的命令全部都不行。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。