Migrating Docker Apps to Scaleway

A dedicated 4-core ARM Server for €2.99/month

October 9, 2015

Apache Spark A Scaleway C1 Server. Photo taken from Scaleway

Scaleway is a new IaaS cloud provider offering dedicated bare-metal SSD servers based on ARM hardware. Currently running their operation out of Paris, Scaleway is particular attractive for folks in Europe. Especially since they just slashed their prices by 70% to €2.99/month for a 4-core ARM server with 2GB of memory and 50GB SSD storage. Compared to the $10/month I currently paying at DigitalOcean for a 1vCPU, 1GB memory, 30 GB SSD, a pretty attractive offer and definitely worth a try.

Since I run all my applications and websites inside Docker containers, I was curious how simple it would be to migrate those from my Intel x86-based cloud instances at DigitalOcean to Scaleway’s ARM-based bare-metal micro servers.

Pick the Right Server Image

Spinning up a new server is pretty simple. After signing up for a new account and adding a credit card, you simply select an operating system image and hit “Create Server”. 60 seconds later your new server is up and running. While Scaleway offers only one type of server, the €2.99/month “C1”, you can choose from a plethora of operating system images and pre-configured application from the Scaleway ImageHub.

I started off with a standard Ubuntu 14.04 TLS image, but quickly found out that due to the 32-bit ARM v7 architecture, installing Docker wouldn’t work out of the box:

$> curl -sSL https://get.docker.com/ | sh

Error: you are not using a 64bit platform.
Docker currently only supports 64bit platforms.

Luckily, Scaleway provides a System Image based on Ubuntu 15.04 (Vivid) with Docker 1.7.1 preinstalled. Spinning up a fresh server with this image gave me exactly what I was looking for:

$> docker version

Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): linux/arm
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d
OS/Arch (server): linux/arm

Et voilà: a working Docker host. So far so good. Running a simple “Hello World!” sanity check however, failed with the following error:

$> docker run ubuntu:14.04 /bin/echo 'Hello world'
91e54dfb1179: Pull complete

Status: Downloaded newer image for ubuntu:14.04
exec format error
Error response from daemon: Cannot start container 002507fc8432833aa713516a67d933da044f...: [8] System error: exec format error

Docker Images for ARM Architecture

Turns out that of course you need ARM-specific base images for your containers. Again, Scaleway has prebuilt a few popular ones. You can search the registry for ARM-compatible images with the search command:

$> docker search armbuild | sort

I found an ARM counterpart to the “official” ubuntu image that I use as the foundation for most of my containers. It’s called armbuild/ubuntu. With this image the “Hello World!” example works just fine.

$> docker run armbuild/ubuntu:14.04 /bin/echo 'Hello world'
Pulling repository armbuild/ubuntu
Status: Downloaded newer image for armbuild/ubuntu:14.04
Hello world

Consequently, all I had to do in order to get my images to work was to change the FROM line in my Dockerfiles from:

FROM ubuntu:14.04


FROM armbuild/ubuntu:14.04

and rebuild the images. Once the image was built, running a Docker container works just like on a regular platform. As a matter of fact, this blog is now running inside a Docker container on Scaleway’s ARM server.

Further Reading


comments powered by Disqus