questionasker
questionasker

Reputation: 2697

fastlane - error at google cloud build: "OCI runtime create failed: container_linux.go:345"

I'm using fastlane container that stores at google container registry to upload APK to google play store using Google Cloud Build.

APK has been succesfully created.However, when processing last step (fastlane), it face errors:

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

Note:

1) Docker Source file was taken from https://hub.docker.com/r/fastlanetools/fastlane and then I build my own image.

2) Docker Image Build on Google Cloud VM using Debian GNU/Linux 9 (stretch)

Docker Source File for fastlane:

# 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

Any Idea to solve this?

Upvotes: 0

Views: 776

Answers (1)

questionasker
questionasker

Reputation: 2697

I solve this by building docker image using docker source from Google Cloud Official other than fastlane on hub.docker.com (where's it never update since 5 month ago)

Upvotes: 0

Related Questions