Easy headless setup for Raspberry Pi Zero W on OSX

You’ve got your hands on a Rasberry Pi Zero W! Lucky you. This is a great device for IoT, monitoring, you name it. I’m building a connected wake up light. I will explain how to set up the Raspberry Pi Zero W in headless mode, so without using a screen or keyboard. This will likely also work for any other wifi-equipped Raspberry. You will only need to power the board. »

Start Postgres container and connect with JDBC

Quick example of how to set up a Docker container with Postgresql, using the Spotify Docker Java client. This supposes a running Docker installation on your local computer, for example using boot2docker. import com.google.common.base.Strings; import com.google.common.net.HostAndPort; import com.spotify.docker.client.DefaultDockerClient; import com.spotify.docker.client.DockerCertificateException; import com.spotify.docker.client.DockerClient; import com.spotify.docker.client.DockerException; import com.spotify.docker.client.messages.ContainerConfig; import com.spotify.docker.client.messages.ContainerCreation; import com.spotify.docker.client.messages.ContainerInfo; import com.spotify.docker.client.messages.HostConfig; import lombok.extern.slf4j.Slf4j; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; @Slf4j public abstract class PostgresContainerExample { public static Connection setUpDbContainer() throws SQLException { try { // This will only work with the DOCKER_HOST environment variable set final DockerClient docker = DefaultDockerClient. »

Docker Swarm setup

Edit 2015-01-07: Updated article to reflect changes in swarm. Thanks Rael! Docker Swarm was announced at the first European DockerCon. Swarm is a pluggable cluster manager with a simple scheduler. It’s currently not super easy to set up, so here is how I did it. #Background The swarm executable discovers hosts by reading entries from the discovery url, discovery-stage.hub.docker.com/v1/clusters/TOKEN. Sample output: ["","",""] As you can see, this is just a list of IP/port combinations. »

Service discovering Docker cluster on Digital Ocean

Jeff Lindsay wrote about “Consul Service Discovery with Docker” and Automatic Docker Service Announcement with Registrator. Using Docker’s event stream is an elegant solution to finding out which containers are running on a particular host. Despite Jeff’s documentation and videos, I couldn’t get Consul to serve up the correct locations of my services. Here is a description of what I did to get a service discovering cluster to run on Digital Ocean. »

Remmelt Pit on #docker,