2

We've been trying to install docker on a variety of EC2 AMI's today, amazon linux, ubuntu 14.04 and 16.04 etc and each time we're disconnected from SSH and afterwards cannot reconnect to the EC2 instance.

On the last attempt we followed the instructions located here, but it doesn't seem to matter if we attempt to install via yum, apt-get, or docker's script the result is always the same.

Immediately after starting docker via sudo service docker start our ssh connection is reset.

enter image description here

Any idea what's going on and how to fix it?

klyd
  • 213
  • 1
  • 3
  • 7
  • I would check logs and see if anything is being written to. One place that you can try checking out is /var/log/secure (no guarantees). But basically, run ls -latr and check with the latest logs to see what messages occur based on this and post it to your question – ryekayo Oct 12 '17 at 20:48

1 Answers1

0

Docker service kicking you off SSH doesn't really make any sense. Do you have any iptables rules configured? Any other steps you're taking after provisioning the system? There has to be more to this story.

Anyways -- You mentioned you tried on Ubuntu 16.04. Here is direct out of my notes and has worked perfectly for me several times on Ubuntu 16.04:

sudo apt-get update

sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

sudo apt-get update

Then, check what versions are available to you:

sudo apt-cache madison docker-ce

Then, finally, run the install (this step will vary as packages change):

sudo apt-get install -y docker-ce=17.03.2~ce-0~ubuntu-xenial

Then finally, test that you're up and running:

sudo docker run hello-world

MORE INFO: https://docs.docker.com/install/linux/docker-ce/ubuntu/

emmdee
  • 1,935
  • 9
  • 35
  • 56