Can't make aws cli get-login to work in 2.0

awscli
docker
2.0

#1

Hi,

Not a docker expert per se, so please take that into account.
I’ve migrated from 1.0 to 2.0, to see a decline in testing times from 04:50 to 02:20, which is amazing… but I can’t make aws-cli work.

To clarify, it’s there, I have it installed, but it can’t find a running docker service to connect to.

This is OK, since there aren’t any running, here’s how I tried:

I copied the contents of https://get.docker.com/builds/Linux/x86_64/docker-17.05.0-ce.tgz to /usr/bin.
In this folder, I try to run dockerd, but it always gives me an error of
can't initialize iptables tablenat’: Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.`

I’ve tried to run it as:

  • /usr/bin/dockerd
  • sudo /usr/bin/dockerd
  • su -c /usr/bin/dockerd

I’ve even tried to add the current user with usermod -a -G to the docker group.

But the error message remains the same. Is this perhaps an intended “feature” so that the circleci user is not allowed to access iptables?

Any help would be much appreciated.

Thanks,
Alex


#2

I was able to resolve this by adding a docker image, calling

- setup_remote_docker and then running

  - run:
      name: Install Docker Engine
      command: |
          set -x
          VER="17.03.0-ce"
          curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
          tar -xz -C /tmp -f /tmp/docker-$VER.tgz
          mv /tmp/docker/* /usr/bin

Although this works, remote docker takes 1:30 to finish.


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.