Ec2 instance does not persist upgrade from 17.03 to 18.03-ce

Expected behavior

I’ve made manual updates to an ec2 instance to upgrade to docker 18.03-ce. I expect the docker --version to remain 18.03 after I restart the ec2 instance.

Actual behavior

After I upgrade the ec2 instance to docker 18.03-ce, everything works as I expect. When i restart the ec2 instance, or if I create an AMI from the instance, and launch a new instance, i’m reverted back to docker 17.03

Additional Information

  • EBS backed volume.
  • modified file: /lib/systemd/system/docker.service
    with the follwoing update: ExecStart=/usr/bin/dockerd -H fd:// -s=overlay2

Steps to reproduce the behavior

  1. EC2 image created via kops. creating new instance group for worker node:
  2. following steps from here to update docker-ce and nvidia:
  3. verify docker --version is 18.03
  4. restart ec2 instance
  5. verify docker --version is reverted back to 17.03