This is a guide to how to get your brand spanking new Linode server up and running with Docker.
Need to know more about those? Check out resources below.
Our Linode is running Ubuntu 13.04 LTS
ssh into your linode using the information you will find in your management console Linodes > Remote Access
Update your linux distribution package manager and software just to ensure you have all the right things as up to date as possible,
apt-get update && apt-get upgrade
The next step is to set your hostname. The following two commands allow you to do this
echo "tuvok" > /etc/hostname hostname -F /etc/hostname
You can check whether the hostname is set by just using this:
Add this hostname to your etc hosts file. Add IP of linode and IPV6 as well
Set up the date
check the date to ensure it’s set as you expected.
You don’t want to be logging in as root to your server so now it’s time to set up some users, add some ssh keys and remove external login for the root user
Firstly create a new user
Add user to sudoers
usermod -a -G sudo myuser
Logout of your system and then login using the account you have just created
Now you need to create an ssh keypair
use the defaults, set your passphrase of required
copy your id_rsa.pub file the server using scp
scp ~/.ssh/id_rsa.pub email@example.com:
mv id_rsa.pub .ssh/authorized_keys chown -R myuser:myuser .ssh chmod 700 .ssh chmod 600 .ssh/authorized_keys
Follow the instructions on this page to install docker under your user
Once you have installed it correctly, you should be able to issue the following command
docker run hello-world
and see the response
Hello from Docker. This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account: https://hub.docker.com For more examples and ideas, visit: https://docs.docker.com/userguide/
That’s it! Now you’re ready to install docker images and run them on your instance.