Deploying a remote Docker server using cloud-init
It can be very handy to have a remote Docker server instead of the default local configuration from our workstation because of bandwidth issues, testing a production environment, maybe a customer demonstration, or distant team collaboration. Being able to send the usual Docker commands to a remote server has a multitude of advantages. For speed and comfort, we'll deploy a basic CoreOS system, add one user (Jane) and its public key. Docker will be modified to listen to the network through a socket kind of systemd service, and we'll configure the server time zone to be in New York.
Getting ready
To step through this recipe, you will need:
Access to a cloud-config enabled infrastructure
How to do it...
Let's start by simply calling this server "docker"
:
#cloud-config hostname: "docker"
In the final system, this will set the hostname to the correct value:
$ hostname docker $ cat /etc/hostname docker
Now let's create the Jane
user, so she can log in...