Docker.io and Redis on DigitalOcean in Five Minutes
Join the DZone community and get the full member experience.Join For Free
it all started when i casually spotted a sponsored tweet offering me $10 worth of virtual computing power from digitalocean . i had seen their ads on everything from facebook to gmail and thought i’d check out what the fuss was about.
i had been planning to try docker.io on something other than my macbook for a while and was tempted to run up another linode server. instead, i decided to see if i could get docker running on digitalocean.
docker turned 0.6 over the weekend and is heading full speed toward a production-grade container platform. if you are reading this post you are probably already interested in docker, but for the uninitiated, docker allows you to ship applications as containers running in what appears to be self-contained linux environments. it's is based on linux container magic and runs within the same operating system as its host.
so here is my guide to get docker 0.6.1 running on the digitalocean vm. five minutes starts now!
first, create a new droplet based upon the ubuntu 13.04 x64 image
create the droplet and within a minute or so you should be able to interact with your new machine. your root password is emailed to the registered email address
once it is created, ssh directly on to the box as root. for me it was as simple as:
now, following docker’s install guide, i ran:
apt-get update apt-get install linux-image-extra-`uname -r` sh -c "curl http://get.docker.io/gpg | apt-key add -" sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" apt-get update apt-get install lxc-docker
which allowed me to run docker for the first time.
root@blog:~# docker version client version: 0.6.1 server version: 0.6.1 git commit: 5105263 go version: go1.1.2 last stable version: 0.6.1
now, to run something exciting, let's run redis.
docker run -d johncosta/redis
install redis-cli on the host machine.
apt-get install redis-server redis-cli -h 188.8.131.52 -p 6379
or connect from your macbook.
brew install redis redis-cli -h 184.108.40.206 -p 6379
now, it's time to play with redis.
redis localhost:6379> set docker magic ok redis localhost:6379> get docker "magic"
five minutes must be up by now!
Opinions expressed by DZone contributors are their own.
What Is mTLS? How To Implement It With Istio
8 Data Anonymization Techniques to Safeguard User PII Data
How to Optimize CPU Performance Through Isolation and System Tuning
How To Integrate Microsoft Team With Cypress Cloud