cadvisor/deploy/prepare.sh
Victor Marmol 93754d77ee Make cAdvisor Dockerimage much smaller.
Remove old Dockerfiles for deployment and create a new one that only
includes the statically linked binaries we need. This creates an image
that is ~22MB in size.
2014-07-16 10:01:00 -07:00

12 lines
250 B
Bash

#!/bin/bash
set -e
set -x
# Download lmctfy.
wget http://storage.googleapis.com/cadvisor-bin/lmctfy/lmctfy
chmod +x lmctfy
# Statically build cAdvisor from source and stage it.
go build --ldflags '-extldflags "-static"' github.com/google/cadvisor