Docker Community Forums

Share and learn in the Docker community.

Android CI with Docker (Issue creating container)

Hello all,

I’m new in Docker community and I’ve recently started to work with containers.

I’m trying to following a guide " Android CI with kubernetes" by Anton Malinskiy (

In this guide there is a repository ( with all that is needed to create a container with Docker. But everytime I try to build the container I get the same error. I have tried in windows 10, Mac OX, and ubuntu 18.10.

It seems to be a error related with the public key, but I’m not familiar with all this stuff. I’ve tried to Google the error message but nothing seems to solve the problem.

This is the error I get:

C:\docker-android>docker build -t test .
Sending build context to Docker daemon 136.7kB
Step 1/12 : FROM ubuntu:16.04
—> 9361ce633ff1
Step 2/12 : MAINTAINER Anton Malinskiy ""
—> Using cache
—> e568a60a5a5f
Step 3/12 : COPY ./container-limits /
—> Using cache
—> 88a8c826e7e0
Step 4/12 : COPY adb/* /root/.android/
—> Using cache
—> 686ebf1fb774
Step 5/12 : ENV LINK_ANDROID_SDK= LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 GRADLE_VERSION=4.1 GRADLE_HOME="/opt/gradle-4.1/bin" ANDROID_HOME=/opt/android-sdk-linux PATH="$PATH:/usr/local/rvm/bin:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/tools/bin:/opt/android-sdk-linux/emulator:/opt/gradle-4.1/bin"
—> Using cache
—> e16eb17d2645
Step 6/12 : RUN dpkg --add-architecture i386 && echo “deb mirror:// xenial main restricted universe multiverse” > /etc/apt/sources.list && echo “deb mirror:// xenial-updates main restricted universe multiverse” >> /etc/apt/sources.list && echo “deb mirror:// xenial-security main restricted universe multiverse” >> /etc/apt/sources.list && echo “deb mirror:// xenial-backports main restricted universe multiverse” >> /etc/apt/sources.list && apt-get update && apt-get install -yq libstdc++6:i386 zlib1g:i386 libncurses5:i386 git mercurial curl ca-certificates unzip git-extras zip software-properties-common apt-transport-https locales --no-install-recommends && apt-get clean && locale-gen en_US.UTF-8
—> Using cache
—> 0fd8223bf20d
Step 7/12 : RUN apt-get update && apt-get install -yq openjdk-8-jdk --no-install-recommends && apt-get clean
—> Using cache
—> bce269cb0bb8
Step 8/12 : RUN curl -sSL | gpg --import - && curl -sSL | grep -v __rvm_print_headline | bash -s stable --ruby && echo “source /Users/Luismi/AppData/Roaming/gnupg\trustdb.gpg” >> ~/.bashrc && /bin/bash -l -c “gem install bundler stf-client:0.2.0 --no-ri --no-rdoc”
—> Running in 4c31f3acae2b

gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
gpg: no ultimately trusted keys found
gpg: Signature made Thu 03 Jan 2019 10:01:48 PM UTC using RSA key ID 39499BDB
gpg: Can't check signature: public key not found
GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.7.tgz' - ''! Try to install GPG v2 and then fetch the public key:

gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

or if it fails:

command curl -sSL | gpg --import -

command curl -sSL | gpg --import -

In case of further problems with validation please refer to

The command '/bin/sh -c curl -sSL | gpg --import - &&     curl -sSL | grep -v __rvm_print_headline | bash -s stable --ruby &&     echo "source /Users/Luismi/AppData/Roaming/gnupg\trustdb.gpg" >> ~/.bashrc &&     /bin/bash -l -c "gem install bundler stf-client:0.2.0 --no-ri --no-rdoc"' returned a non-zero code: 2

Hopefully anyone could know how to solve this issue.

Thank you and have a nice day!