Sign inSign up

ventz/armhf-haproxy

By ventz

Updated over 10 years ago

Alpine HAProxy for ARMHF (PI, PI2, etc) - 127MB Image

Image
4

1.6K

ventz/armhf-haproxy repository overview

How to RUN this image:

docker run -it --rm=true ventz/armhf-haproxy haproxy

How to Create your own Alpine HAProxy container

Again, as with MOST ARM containers, people never mentioned how they build it. And after all, are you really going to run some random person's "trust-me-I-am-not-evil" image?

So, here's how to build one yourself:

  1. Boot into an ARM OS with Docker OS (ex: Hypriot would be the best, or Raspbian with Hypriot's package, or your own)

  2. Pull the 'ventz/armhf-alpine' (note: this has it's own "How to Create Your Own") and launch a shell:

docker run -it --rm=true ventz/armhf-alpine /bin/sh
  1. Get the Latest stable HAProxy (1.6.3 as of now) and pull the dependencies (libpcre)
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz
apk add --update pcre-dev
  1. Decompress/untar, cd into dir, and make:
tar -zxvf haproxy-1.6.3.tar.gz
cd haproxy-1.6.3
make TARGET=custom CPU=native USE_PCRE=1 USE_LIBCRYPT=1 USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1
make install
cd; rm .ash_history

That's it. Now you have "haproxy" in /usr/local/sbin

You can sym-link it into root's "home" directory (/root) for easier calling in the docker container.

Now, from OUTSIDE of the container (from the docker-engine):

docker commit $CONTAINER-ID dockerhubusername/armhf-haproxy

Credit for options/great information to: louwrentius (http://louwrentius.com/how-to-compile-haproxy-from-source-and-setup-a-basic-configuration.html)

Tag summary

Content type

Image

Digest

Size

43.4 MB

Last updated

over 10 years ago

docker pull ventz/armhf-haproxy