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




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 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.



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
          curl -L -o /tmp/docker-$VER.tgz$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.


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