How it works...

Login into an EC2 instance and verify whether ec2-user can run Docker commands without using sudo by executing following command:

[ec2-user@ip-54-196-74-162 ~]$ docker info

This will display system-wide information regarding the Docker installation, as shown in the following output:

 Containers: 1 Running: 1 Paused: 0 Stopped: 0 Images: 1 ... Kernel Version: 4.9.62-21.56.amzn1.x86_64 Operating System: Amazon Linux AMI 2017.09 ... Live Restore Enabled: false

Get Go Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.