https://github.com/chrisrx/docker_scratch_example
example using static compiled Golang binary and scratch docker image to produce small docker containers
https://github.com/chrisrx/docker_scratch_example
Last synced: 9 months ago
JSON representation
example using static compiled Golang binary and scratch docker image to produce small docker containers
- Host: GitHub
- URL: https://github.com/chrisrx/docker_scratch_example
- Owner: ChrisRx
- License: mit
- Created: 2016-05-03T21:52:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-03T21:54:27.000Z (over 9 years ago)
- Last Synced: 2025-01-21T13:11:16.713Z (11 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker_scratch_example
example using static compiled Golang binary and scratch docker image to produce small docker containers
Take a look at the `Makefile` to see how it works. Included in the `build-cgo` target is the go build options necessary to ensure that even when dealing with cgo code that the go executable is statically compiled. This tiny [echo](https://github.com/labstack/echo) server doesn't include any C, but figured I would put it in there in as a reference.
Running `docker images | grep tiny-server` then shows that the resulting docker image is only ~9mb (uncompressed).