5. The Docker
Way
1.inherit from a
Docker image
FROM my-arm-image
2.customize
RUN apt-get
install ...
3.convert it to a
Scaleway image
$ make build
while42 Paris #13 (14/04/14) - by @moul & @aimxhaisse 5
6. HelloWorld
Dockerfile
# Inherit from the Ubuntu Trusty Scaleway image
FROM armbuild/scw-distrib-ubuntu:trusty
# Install the `cowsay` package
RUN apt-get install -y -qq cowsay
# Add local assets
COPY ./patches/ /
while42 Paris #13 (14/04/14) - by @moul & @aimxhaisse 6
7. Let's Build
$ make build
» docker build, run,
export
$ make image
» spawns a C1
instance, export
tarball to the
volume and snapshot
while42 Paris #13 (14/04/14) - by @moul & @aimxhaisse 7
8. Pros !
can portexisting images from community
sed -i 's/^FROM .*$/FROM armbuild/scw-distrib-ubuntu:trusty/' Dockerfile
while42 Paris #13 (14/04/14) - by @moul & @aimxhaisse 8
9. Pros !
benefitfrom Docker/
Dockerfile features
» inheritance: images
apps are simple and
concise
» caching:
incrementally build
images
» debug: drop a shell
in the image thanks
to docker run
» pull/push: sources
while42 Paris #13 (14/04/14) - by @moul & @aimxhaisse 9
10. Pros !
easyto contribute
» Dockerfile is a
known standard
» sources & issues are
on GitHub
$ nano Dockerfile
$ git commit -am 'Added cool feature. :neckbeard:'
while42 Paris #13 (14/04/14) - by @moul & @aimxhaisse 10
11. Cons
» no official support of Docker on ARM
» some applications aren't ARM-ready
» no crossbuild
while42 Paris #13 (14/04/14) - by @moul & @aimxhaisse 11