forked from google/cadvisor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
4 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM scratch | ||
MAINTAINER dengnan@google.com vmarmol@google.com | ||
|
||
# NOTE: Run prepare.sh before building this Docker image. | ||
|
||
# Grab lmctfy and cadvisor from the staging directory. | ||
ADD lmctfy /usr/bin/lmctfy | ||
ADD cadvisor /usr/bin/cadvisor | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT ["/usr/bin/cadvisor"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/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 |