title: Go-compiled binary won't run in an alpine docker container on Ubuntu host
body: <p>Given a binary, compiled with Go using <code>GOOS=linux</code> and <code>GOARCH=amd64</code>, deployed to a <code>docker</code> container based on <code>alpine:3.3</code>, the binary will not run if the docker engine host is Ubuntu (15.10):</p>
  
  <pre><code>sh: /bin/artisan: not found
  </code></pre>
  
  <p>This same binary (compiled for the same OS and arch) will <strong>run just fine</strong> if the docker engine host is <code>busybox</code> (which is the base for <code>alpine</code>) deployed within a VirtualBox VM on Mac OS X.</p>
  
  <p>This same binary will also run perfectly fine if the container is based on one of Ubuntu images.</p>
  
  <p><strong>Any idea what this binary is missing?</strong></p>
  
  <p>This is what I've done to reproduce (successful run in VirtualBox/busybox on OS X not shown):</p>
  
  <p>Build (building explicitly with flags even though the arch matches):</p>
  
  <pre><code>➜  artisan git:(master) ✗ GOOS=linux GOARCH=amd64 go build
  </code></pre>
  
  <p>Check it can run on the host:</p>
  
  <pre><code>➜  artisan git:(master) ✗ ./artisan 
  10:14:04.925 [ERROR] artisan: need a command, one of server, provision or build 
  </code></pre>
  
  <p>Copy to docker dir, build, run:</p>
  
  <pre><code>➜  artisan git:(master) ✗ cp artisan docker/build/bin/        
  ➜  artisan git:(master) ✗ cd docker 
  ➜  docker git:(master) ✗ cat Dockerfile 
  FROM docker:1.10
  COPY build/ /
  ➜  docker git:(master) ✗ docker build -t artisan .
  Sending build context to Docker daemon 10.15 MB
  Step 1 : FROM docker:1.10
  ...
  ➜  docker git:(master) ✗ docker run -it artisan sh
  / # /bin/artisan 
  sh: /bin/artisan: not found
  </code></pre>
  
  <p>Now changing the image base to <code>phusion/baseimage</code>:</p>
  
  <pre><code>➜  docker git:(master) ✗ cat Dockerfile 
  #FROM docker:1.10
  FROM phusion/baseimage
  COPY build/ /
  ➜  docker git:(master) ✗ docker build -t artisan .
  Sending build context to Docker daemon 10.15 MB
  Step 1 : FROM phusion/baseimage
  ...
  ➜  docker git:(master) ✗ docker run -it artisan sh
  # /bin/artisan
  08:16:39.424 [ERROR] artisan: need a command, one of server, provision or build 
  </code></pre>