Public | Automated Build

Last pushed: 2 years ago
Short Description
Compiles rudder from google/golang base image. Not intended to be used directly. See gurpartap/rudder instead.
Full Description

Build and package rudder with busybox using Docker

Builds a google/golang based image which builds rudder from source and then packages the built binary with busybox base image. The final image is around 9.9MB in size as seen from docker images.

Also serves as an example for docker within docker usage and shipping binaries with a minimal base image (busybox) after compiling in an intermediary image.

The busybox based rudder repo is available at https://registry.hub.docker.com/u/gurpartap/rudder.

Building and releasing
$ cat ./script/build.sh
docker build --rm --force-rm -t gurpartap/rudder-build .
docker run -v /var/run/docker.sock:/var/run/docker.sock \
           -v $(which docker):/usr/local/bin/docker \
           -ti --name rudder-build gurpartap/rudder-build
$ cat ./script/push.sh
docker push gurpartap/rudder:latest
$ cat ./script/clean.sh
docker rm -f rudder-build
docker rmi -f gurpartap/rudder-build
docker rmi -f gurpartap/rudder
$ ./script/release.sh # will run them all.
Copying the binary to host
# Mount host's /opt/bin directory in the container and copy rudder over.
docker run --rm -v /opt/bin:/opt/bin gurpartap/rudder
Provision rudder on CoreOS, etc. using Vagrant
config.vm.provision :docker do |docker|
  docker.run "gurpartap/rudder",
    args: "--rm -v /opt/bin:/opt/bin",
    auto_assign_name: false, daemonize: false
end

If you have any feedback, please contact me.

Docker Pull Command
Owner
gurpartap
Source Repository