Skip to content
Permalink
Browse files

Adding socat to the haproxy container

  • Loading branch information
Jim Van Fleet
Jim Van Fleet committed Oct 18, 2016
1 parent 8f48370 commit a0019cc2bc26d8272f7be8a0d0b947fba2e34dab
Showing with 10 additions and 1 deletion.
  1. +1 −0 haproxy/Dockerfile
  2. +1 −0 haproxy/conf/haproxy.cfg
  3. +2 −0 haproxy/container_files/bin/haproxycfg.sh
  4. +6 −1 tests/haproxy.bats
@@ -12,4 +12,5 @@ LABEL ImageOS=centos7
LABEL Version=$version LABEL Version=$version


RUN apt-get update && apt-get install -y socat RUN apt-get update && apt-get install -y socat
COPY container_files/ /opt
copy conf/haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg copy conf/haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
@@ -2,6 +2,7 @@
global global
log 127.0.0.1 local0 log 127.0.0.1 local0
log 127.0.0.1 local1 notice log 127.0.0.1 local1 notice
stats socket /usr/local/etc/haproxysock level admin


defaults defaults
log global log global
@@ -0,0 +1,2 @@
#!/bin/bash
echo "$@" | socat unix-connect:/usr/local/etc/haproxysock stdio
@@ -6,4 +6,9 @@ load ../common


@test "socat process exists" { @test "socat process exists" {
docker exec -i haproxy which socat docker exec -i haproxy which socat
} }

@test "socat helper process exists" {
docker exec -i haproxy /opt/bin/haproxycfg.sh show stat
}

0 comments on commit a0019cc

Please sign in to comment.
You can’t perform that action at this time.