ogra1/snapd-docker

unable to run example on Google Cloud Shell

ctaggart opened this issue · 3 comments

I think the free Google Cloud Shell has all the dependencies needed, but when I try the example, it times out.

image

My only couple of changes being:

cameron_taggart@ctaggartcom:/tmp/snapd-docker$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
        modified:   build.sh
no changes added to commit (use "git add" and/or "git commit -a")
cameron_taggart@ctaggartcom:/tmp/snapd-docker$ git diff
diff --git a/build.sh b/build.sh
index 8551d17..6fa8942 100755
--- a/build.sh
+++ b/build.sh
@@ -89,7 +89,7 @@ RUN apt-get update &&\
  apt-get install -y fuse snapd snap-confine squashfuse sudo &&\
  apt-get clean &&\
  dpkg-divert --local --rename --add /sbin/udevadm &&\
- ln -s /bin/true /sbin/udevadm &&\
+ ln -s /bin/true /sbin/udevadm 
 RUN systemctl enable snapd
 VOLUME ["/sys/fs/cgroup"]
 STOPSIGNAL SIGRTMIN+3
@@ -114,7 +114,7 @@ $SUDO docker run \
     -d $IMGNAME || clean_up
 # wait for snapd to start
-TIMEOUT=20
+TIMEOUT=60
 SLEEP=3
 echo -n "Waiting $(($TIMEOUT*3)) seconds for snapd startup"
 while [ -z "$($SUDO docker exec $CONTNAME pgrep snapd)" ]; do
ogra1 commented
- ln -s /bin/true /sbin/udevadm &&\
+ ln -s /bin/true /sbin/udevadm 

why did you drop the &&\ there (did you try adding it back ?)

I was trying to fix this error:

Processing triggers for systemd (232-21ubuntu5) ...
Adding 'local diversion of /sbin/udevadm to /sbin/udevadm.distrib'
/bin/sh: 1: RUN: not found
Removing intermediate container 1e98c673d66f
The command '/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y fuse snapd snap-confine squashfuse sudo && apt-get clean && dpkg-divert --lo
cal --rename --add /sbin/udevadm && ln -s /bin/true /sbin/udevadm &&RUN systemctl enable snapd' returned a non-zero code: 127
cameron_taggart@ctaggartcom:/tmp/snapd-docker$

I tried upgrading Docker from 1.11.2 to 17.05.0-ce (latest), but I get the same error.