<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Docker on Miek Gieben</title>
    <link>https://miek.nl/tags/docker/</link>
    <description>Recent content in Docker on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Sat, 13 Jan 2018 10:38:37 +0000</lastBuildDate>
    <atom:link href="https://miek.nl/tags/docker/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Running CoreDNS as a Forwarder in Kubernetes</title>
      <link>https://miek.nl/2018/january/13/running-coredns-as-a-forwarder-in-kubernetes/</link>
      <pubDate>Sat, 13 Jan 2018 10:38:37 +0000</pubDate>
      <guid>https://miek.nl/2018/january/13/running-coredns-as-a-forwarder-in-kubernetes/</guid>
      <description>&lt;p&gt;This post details how I got CoreDNS running as a forwarder in a &lt;a href=&#34;https://k8s.io&#34;&gt;Kubernetes&lt;/a&gt; cluster.&#xA;There were several problems that stood in the way of this goal:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Having (and building) a cluster out of Raspberry PIs.&lt;/li&gt;&#xA;&lt;li&gt;Making load balancing possible in a non-cloud environment.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;See &lt;a href=&#34;https://github.com/google/metallb&#34;&gt;https://github.com/google/metallb&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Extending CoreDNS with a plugin that could communicate with 9.9.9.9 using&#xA;&lt;a href=&#34;https://tools.ietf.org/html/rfc7858&#34;&gt;DNS-over-TLS&lt;/a&gt;.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;See &lt;a href=&#34;https://github.com/coredns/forward&#34;&gt;https://github.com/coredns/forward&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Building arm docker containers on amd64.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;See &lt;a href=&#34;https://github.com/miekg/dxbuild&#34;&gt;https://github.com/miekg/dxbuild&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Having a (simple) CI system to build (Docker) images and version the k8s manifests.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No published repository, see various gists referenced in this document.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;cluster&#34;&gt;Cluster&lt;/h2&gt;&#xA;&lt;p&gt;I bought 4 PIs, some nice Corkea cases, an Anker USB power supply and power- and&#xA;network cables. Then it is just a matter if putting everything together and building the cluster.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go and Alpine Linux</title>
      <link>https://miek.nl/2015/june/06/go-and-alpine-linux/</link>
      <pubDate>Sat, 06 Jun 2015 11:13:00 +0000</pubDate>
      <guid>https://miek.nl/2015/june/06/go-and-alpine-linux/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.alpinelinux.org/&#34;&gt;Alpine Linux&lt;/a&gt; is &lt;em&gt;the&lt;/em&gt; small Linux OS everybody&#xA;is using for Docker images. It is super small and has a sh*tload of packages.&#xA;It&amp;rsquo;s libc is &lt;a href=&#34;http://www.musl-libc.org/&#34;&gt;musl libc&lt;/a&gt;, which is different than&#xA;glibc most other Linux distros are using. When deploying Go on such a image you&#xA;want a truly static binary.&lt;/p&gt;&#xA;&lt;p&gt;Building a static binary can be done with the following command (this is for&#xA;&lt;a href=&#34;https://github.com/miekg/skydns&#34;&gt;SkyDNS&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% go build -ldflags &amp;quot;-linkmode external -extldflags -static&amp;quot;&#xA;# github.com/miekg/skydns&#xA;/var/tmp/go-link-FI6Ox0/000000.o: In function `_cgo_632c88804cec_C2func_getaddrinfo&#39;:&#xA;/home/miek/upstream/go/src/net/cgo_unix.go:55: warning: Using &#39;getaddrinfo&#39; in&#xA;statically linked applications requires at runtime the shared libraries from the&#xA;glibc version used for linking&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That ugly warning is because glibc uses nss(5) &amp;ldquo;Nameserver Service Switch&amp;rdquo; which&#xA;uses dlopen(3) to &lt;em&gt;dynamically&lt;/em&gt; load the correct resolver library. The end&#xA;result is that the Go binary &lt;em&gt;can&amp;rsquo;t resolve any DNS records&lt;/em&gt;!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Docker Alpine Linux Image for ARM</title>
      <link>https://miek.nl/2015/may/25/docker-alpine-linux-image-for-arm/</link>
      <pubDate>Mon, 25 May 2015 15:25:00 +0000</pubDate>
      <guid>https://miek.nl/2015/may/25/docker-alpine-linux-image-for-arm/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.alpinelinux.org/&#34;&gt;Alpine Linux&lt;/a&gt; is a super small Linux distribution&#xA;which targets Docker. The only downside is that they use &lt;a href=&#34;http://www.musl-libc.org/&#34;&gt;musl libc&lt;/a&gt;&#xA;instead of glibc, which causes some issues for&#xA;Golang programs. But I want this as a base image for SkyDNS on my Raspberry Pi,&#xA;running &lt;a href=&#34;http://blog.hypriot.com/&#34;&gt;HypriotOS&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;After reading a modest amount of documentation I found the&#xA;&lt;a href=&#34;https://raw.githubusercontent.com/lifeeth/docker-arm/master/contrib/mkimage-alpine.sh&#34;&gt;mkimage-alpine.sh&lt;/a&gt;&#xA;script which build a docker image ala&#xA;&lt;a href=&#34;https://registry.hub.docker.com/_/alpine/&#34;&gt;alpine&lt;/a&gt;, but makes it possible to&#xA;select different archs. I had to tweak this script a little to make it do what&#xA;I want, but after that it worked.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS Router</title>
      <link>https://miek.nl/2014/may/17/dns-router/</link>
      <pubDate>Sat, 17 May 2014 10:35:00 +0000</pubDate>
      <guid>https://miek.nl/2014/may/17/dns-router/</guid>
      <description>&lt;p&gt;Say you have a zone that does not fit in the memory of one machine. Who hasn&amp;rsquo;t these&#xA;zones nowadays? How would you solve such a problem? With a DNS router of course!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/miekg/dnsrouter&#34;&gt;Dns router&lt;/a&gt; is a small Go program I whipped together that acts as a&#xA;DNS router. Clients register an &lt;code&gt;&amp;lt;ip:port, regexp&amp;gt;&lt;/code&gt; combination and will then only&#xA;receive queries that match that regular expression. The registration happens&#xA;in &lt;a href=&#34;https://github.com/coreos/etcd&#34;&gt;Etcd&lt;/a&gt;. Of course &amp;ldquo;Dns router&amp;rdquo; (I need a better name), has some&#xA;features, it will:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
