fastlane-Google Cloud build错误:“ OCI运行时创建失败:container_linux.go:345”

时间:2019-08-29 23:30:32

标签: docker google-cloud-platform fastlane google-container-registry google-cloud-build

我正在使用存储在Google容器注册表中的fastlane容器,使用Google Cloud Build将APK上传到Google Play商店。

APK已成功创建。但是,在处理最后一步( fastlane )时,它会遇到错误:

Step #2: 487ea6dabc0c: Pull complete
Step #2: a7ae4fee33c9: Pull complete
Step #2: Digest: sha256:2e31d5ae64984a598856f1138c6be0577c83c247226c473bb5ad302f86267545
Step #2: Status: Downloaded newer image for gcr.io/myapp789-app/fastlane:latest
Step #2: gcr.io/myapp789-app/fastlane:latest
Step #2: docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"supply\": executable file not found in $PATH": unknown.
Step #2: time="2019-08-29T23:22:55Z" level=error msg="error waiting for container: context canceled"
Finished Step #2
ERROR
ERROR: build step 2 "gcr.io/myapp789-app/fastlane" failed: exit status 127

注意:

1)Docker源文件来自 https://hub.docker.com/r/fastlanetools/fastlane ,然后我构建了自己的映像。

2)使用Debian GNU/Linux 9 (stretch)

Google Cloud VM 上构建Docker Image

fastlane的Docker源文件:

# Final image #
###############
FROM circleci/ruby:latest
MAINTAINER milch

ENV PATH $PATH:/usr/local/itms/bin

# Java versions to be installed
ENV JAVA_VERSION 8u131
ENV JAVA_DEBIAN_VERSION 8u131-b11-1~bpo8+1
ENV CA_CERTIFICATES_JAVA_VERSION 20161107~bpo8+1

# Needed for fastlane to work
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

# Required for iTMSTransporter to find Java
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre

USER root

# iTMSTransporter needs java installed
# We also have to install make to install xar
# And finally shellcheck
RUN echo 'deb http://archive.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-
backports.list \
        && apt-get -o Acquire::Check-Valid-Until=false update \
        && apt-get install --yes \
                make \
                shellcheck \
        && apt-get clean \
        && rm -rf /var/lib/apt/lists/*

USER circleci

COPY --from=xar_builder /tmp/xar /tmp/xar

RUN cd /tmp/xar \
        && sudo make install \
        && sudo rm -rf /tmp/*

CloudBuild.yaml:

- name: 'gcr.io/$PROJECT_ID/fastlane'
  args: ['supply', '--package_name','${_ANDROID_PACKAGE_NAME}', '--track', '${_ANDROID_RELEASE_CHANNEL}', '--json_key_data', '${_GOOGLE_PLAY_UPLOAD_KEY_JSON}', '--apk', '/workspace/${_REPO_NAME}/build/app/outputs/bundle/release/app.aab']
timeout: 1200s

有解决任何想法吗?

1 个答案:

答案 0 :(得分:0)

我通过使用 this page 上的docker源(而不是 hub.docker.com 上的fastlane)构建docker映像来解决此问题(自5个月以来从未更新过)之前)