Build Size - docker vs go

Just getting started with Traefik - looks awesome.

Following the "Building and Testing" doc:

  • Using Method 1 (Docker and Makefile) - the built binary "dist/traefik" is ~68M
% pwd
/Users/mich9463/go/src/github.com/containous/traefik

% ls -lh dist
total 139432
-rwxr-xr-x  1 mich9463  mich9463    68M Jul 15 17:04 traefik
  • Using Method 2 (go) - the build binary ./traefik is ~103M
% ls -lh ./traefik
-rwxr-xr-x  1 mich9463  mich9463   103M Jul 15 17:30 ./traefik

Two questions:

  1. What is included between these two build methods to cause the binary size to differ so greatly?

  2. When I first read Method 2 (go), I thought this method would not require Docker. However the make generate-webui command uses Docker and make. What is the purpose of this alternative build over Method 1 (Docker and Makefile)?

-Mike