I love playing and exploring new approaches and technologies and understanding why they’re different. Yet many of the upcoming technologies have a high barrier to entry which removes the fun of learning. As such we set out to put the fun back into learning new technologies with Scrapbook.
The aim of Scrapbook has been to make it easier to learn and play with new technologies. We recently released Docker scenarios to teach Docker with an online learning environment.
Docker just announced the new 1.8 RC release which you can now try with Scrapbook. We’ve created a playground that has the latest Docker daemon and client for you to use.
The playground is available at app.joinscrapbook.com/ben_hall/scenarios/docker_rc
For a limited time only the Docker course is available for free.
The recent release of Ubuntu (15.04) introduced Systemd as a replacement for Upstart. Systemd is the init system for Linux and starts all the required services.
With new systems comes new approaches. One of the main activities is customising the launch of services such as Docker.
With Upstart, extra Docker launch parameters like storage devices are set in
/etc/default/docker. An example is
With Systemd, you need to update Docker’s service file to use the extra parameters via a EnvironmentFile.
1) Docker’s system file can located at
2) The ExecStart line defines how to start a service. By default this is
ExecStart=/usr/bin/docker -d -H fd://
3) Include the line
EnvironmentFile=/etc/default/docker above ExecStart
4) Update the ExecStart to use the variable created.
ExecStart=/usr/bin/docker -d -H fd:// $DOCKER_OPTS
The complete docker.service file should look like
Description=Docker Application Container Engine
ExecStart=/usr/bin/docker -d -H fd:// $DOCKER_OPTS
When the service starts it also includes the parameters defined in
/etc/default/docker does not exist then it will fail to start
2) Every time you upgrade Docker the docker.service file is overridden meaning you need to repeat the above steps. This is why I find it useful to keep the variables in a separate file.
As some of you are aware, I’m currently in the progress of building Scrapbook, an Interactive Learning Environment for Developers. The aim of Scrapbook has always been to make learning new technologies and frameworks easier and more interactive. By removing the need to download and configure the technologies you can jump straight into exploring while still having enough access and control to learn and break things in your own way.
Today Docker announced an easier way to try new bleeding edge features via an experimental binary.
“Docker’s experimental binary gives you access to bleeding edge features that are not in, and may never make it into, Docker’s official release. An experimental build allows users to try out features early and give feedback to the Docker maintainers” http://blog.docker.com/2015/06/experimental-binary/
However experimental binaries by their very nature have unknown side-effects.
To make it easier for people to use the Docker Experimental Binary we’ve created a Playground on Scrapbook. The playground has the latest version installed allowing you to explore the new features via your browser without having to download or install anything onto your local machine.
You can sign up for free at http://app.joinscrapbook.com/courses/docker-experimental/playground
If you want to learn more about the current features of Docker then take our interactive online course at http://app.joinscrapbook.com/courses/docker
Below are the slides and video of my “Running Docker in Development & Production” talk presented at NDC Oslo 2015.
Running Docker and Containers in Development and Production – Ben Hall
Git is now a key component of building software. While the basics are relatively simple to learn, the more advanced aspects can be difficult to pickup. The problem with learning Git, as with many technologies, is configuring a realistic scenario in order to start learning. If you’re using Git by yourself then it’s difficult to understand how to handle merge conflicts. Areas like Rebase and Cherry Picking are useful but just reading the man page doesn’t express why or when you would use them.
Many great resources already exist to help you learn Git but I find the best way for me to learn is to be hands-on and with examples to guide me. This is where Scrapbook comes in.
Scrapbook is a new interactive learning platform for developers. While many platforms aim to teach people the foundations of programming, very few support existing developers in keeping them up-to-date with the latest technologies and boost their experience.
The first course on Scrapbook focuses on Git and covers the common scenarios encountered. By combining a step-by-step tutorial explaining what’s happening along with a configured environment you can start learning instantly without having to download or config anything.
Currently in beta and for a limited time the course is available for free. Sign up at http://app.joinscrapbook.com/courses/git/
We’d love you’re feedback on the course, the platform and the topics you would like to see in future. You can reach us via [email protected]
Slides from a recent presentation I gave on Running Docker in Development and Production.
Keep an eye out for additional presentations, content and training material on Docker.
Like source code, Docker images are required to be built, tested and deployed before they can become containers.
While Docker doesn’t have a build framework, you can take advantage of Make to automate the build process across different environments. By using Make you can have a consistent and shared approach to managing your Docker images without the overhead of using task managers such as gulp.
To execute commands you need a Makefile. The Makefile contains a list of targets that define the commands and arguments required to be executed in order for a particular task to be performed, such as building a Docker image.
The contents of a Makefile might look like this:
docker build -t benhall/docker-make-example .
With this in your project’s root directory, executing the command `make build` will now build the container image.
A Makefile can define multiple targets reflecting different actions. The template below demonstrates a useful Makefile template covering the common scenario’s for managing Docker images.
NAME = benhall/docker-make-demo
docker build -t $(NAME) .
docker push $(NAME)
docker run --rm -it $(NAME) /bin/bash
docker run --rm $(NAME)
release: build push
Learn Docker and Makefiles via Scrapbook, an Interactive Learning Environment.
An interesting Hacker News post this morning mentioning that certain Cloudflare IP addresses might be on the Sky Broadband blocklist. As a user of Cloudflare this is extremely concerning as end users will start to see random behaviour of my websites.
As more ISPs start to block wide reaching services without consideration for other websites then this will only happen more frequently.
To make life easier, with the Dev Tools open in Chrome, click and hold the Reload menu item. A new dropdown will appear allowing you to Empty Cache and Hard Reload the page.
Just a small tip today. During my “What Designs Need To Know About Visual Design” conference presentations I discuss the importance of line height and how increasing it can improve readability on websites and applications. The same technique applies to your development environment and IDE. By increasing the vertical spacing you can make it much easier to read and as a result shouldn’t require as much effort meaning you’re slightly less drained at the end of the day.
Within iTerm you can set the line height in the text preferences.