Skip to content

Commit 83a7fd8

Browse files
aisberggthomasjpfan
authored andcommitted
Update program versions and remodel Dockerfile (#54)
1 parent b597b53 commit 83a7fd8

3 files changed

Lines changed: 24 additions & 18 deletions

File tree

Dockerfile

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
FROM golang:1.9.6 AS build
1+
FROM golang:1.11.0-alpine AS build
22
ADD . /src
33
WORKDIR /src
4-
RUN go get -d -v -t
5-
RUN go test --cover ./... --run UnitTest
6-
RUN go build -v -o docker-flow-proxy
4+
RUN set -x \
5+
&& apk add --update --no-cache --no-progress git g++ \
6+
&& go get -d -v -t \
7+
&& go test --cover ./... --run UnitTest \
8+
&& go build -v -o docker-flow-proxy
79

810

9-
FROM haproxy:1.8.8-alpine
10-
MAINTAINER Viktor Farcic <viktor@farcic.com>
11+
FROM haproxy:1.8.13-alpine
12+
LABEL org.opencontainers.image.title="Docker Flow Proxy" \
13+
org.opencontainers.image.description="Automated HAProxy Reverse Proxy for Docker" \
14+
org.opencontainers.image.url="https://proxy.dockerflow.com" \
15+
org.opencontainers.image.licenses="MIT" \
16+
org.opencontainers.image.authors="Viktor Farcic <viktor@farcic.com>" \
17+
org.opencontainers.image.source="https://github.com/docker-flow/docker-flow-proxy"
1118

12-
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
13-
RUN mkdir -p /cfg/tmpl /templates /certs /logs
19+
RUN apk --update --no-cache --no-progress add tini \
20+
&& mkdir -p /cfg/tmpl /templates /certs /logs
1421

1522
ENV CERTS="" \
1623
CAPTURE_REQUEST_HEADER="" \
@@ -39,21 +46,20 @@ ENV CERTS="" \
3946
TIMEOUT_HTTP_REQUEST="5" TIMEOUT_HTTP_KEEP_ALIVE="15" TIMEOUT_CLIENT="20" TIMEOUT_CONNECT="5" TIMEOUT_QUEUE="30" TIMEOUT_SERVER="20" TIMEOUT_TUNNEL="3600" \
4047
USERS="" \
4148
SKIP_ADDRESS_VALIDATION="true" \
42-
SSL_BIND_OPTIONS="no-sslv3" SSL_BIND_CIPHERS="ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS"
49+
SSL_BIND_OPTIONS="ssl-min-ver TLSv1.2 no-tls-tickets" \
50+
SSL_BIND_CIPHERS="ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:EECDH+AESGCM:EDH+AESGCM"
4351

44-
EXPOSE 80
45-
EXPOSE 443
46-
EXPOSE 8080
52+
EXPOSE 80 \
53+
443 \
54+
8080
4755

48-
RUN apk --no-cache add tini
4956
ENTRYPOINT ["/sbin/tini", "-g", "--"]
5057
CMD ["docker-flow-proxy", "server"]
5158
HEALTHCHECK --interval=5s --start-period=3s --timeout=10s CMD check.sh
5259

5360
COPY scripts/check.sh /usr/local/bin/check.sh
54-
RUN chmod +x /usr/local/bin/check.sh
5561
COPY errorfiles /errorfiles
5662
COPY haproxy.cfg /cfg/haproxy.cfg
5763
COPY haproxy.tmpl /cfg/tmpl/haproxy.tmpl
5864
COPY --from=build /src/docker-flow-proxy /usr/local/bin/docker-flow-proxy
59-
RUN chmod +x /usr/local/bin/docker-flow-proxy
65+
RUN chmod +x /usr/local/bin/docker-flow-proxy /usr/local/bin/check.sh

docs/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ The following environment variables can be used to configure the *Docker Flow Pr
4545
|SERVICE_DOMAIN_ALGO|The default algorithm applied to domain ACLs. It can be overwritten for a service through the `serviceDomainAlgo` parameter.<br>**Examples:**<br>`hdr(host)`: matches only if domain is the same as `serviceDomain`<br>`hdr_dom(host)`: matches the specified `serviceDomain` and any subdomain (a string either isolated or delimited by dots).<br>`req.ssl_sni`: matches Server Name TLS extension<br>**Default Value:** `hdr_beg(host)`|
4646
|SERVICE_NAME |The name of the service. It must be the same as the value of the `--name` argument used to create the proxy service. Used only in the *swarm* mode.<br>**Example:** `my-proxy`<br>**Default value:** `proxy`|
4747
|SKIP_ADDRESS_VALIDATION|Whether to skip validating service address before reconfiguring the proxy.<br>**Example:** false<br>**Default value:** `true`|
48-
|SSL_BIND_CIPHERS |Sets the default string describing the list of cipher algorithms ("cipher suite") that are negotiated during the SSL/TLS handshake for all "bind" lines which do not explicitly define theirs. The format of the string is defined in "man 1 ciphers" from OpenSSL man pages, and can be for instance a string such as `AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH`.<br>**Default value:** see [Dockerfile](https://github.com/docker-flow/docker-flow-proxy/blob/master/Dockerfile#L31)|
49-
|SSL_BIND_OPTIONS |Sets default ssl-options to force on all "bind" lines.<br>**Default value:** `no-sslv3`|
48+
|SSL_BIND_CIPHERS |Sets the default string describing the list of cipher algorithms ("cipher suite") that are negotiated during the SSL/TLS handshake for all "bind" lines which do not explicitly define theirs. The format of the string is defined in "man 1 ciphers" from OpenSSL man pages, and can be for instance a string such as `EECDH+AESGCM:EDH+AESGCM`.<br>**Default value:** see [Dockerfile](https://github.com/docker-flow/docker-flow-proxy/blob/master/Dockerfile#L42)|
49+
|SSL_BIND_OPTIONS |Sets default ssl-options to force on all "bind" lines.<br>**Default value:** `ssl-min-ver TLSv1.2 no-tls-tickets`|
5050
|STATS_USER |Username for the statistics page. If not set, stats will not be available. If both `STATS_USER` and `STATS_PASS` are set to `none`, statistics will be available without authentication.<br>**Example:** my-user<br>**Default value:** `admin`|
5151
|STATS_USER_ENV |The name of the environment variable that holds the username for the statistics page.<br>**Example:** MY_USER<br>**Default value:** `STATS_USER`|
5252
|STATS_PASS |Password for the statistics page. If not set, stats will not be available. If both `STATS_USER` and `STATS_PASS` are set to `none`, statistics will be available without authentication.<br>**Example:** my-pass<br>**Default value:** `admin`|

logging/logging_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (s LoggingTestSuite) Test_StartLogging_OutputsSyslogToStdOut() {
4141
expected := fmt.Sprintf("This is a syslog message %d", i)
4242
go sysLog.Info(expected)
4343
logged := false
44-
for c := 0; c < 200; c++ {
44+
for c := 0; c < 1000; c++ {
4545
if strings.Contains(actual, expected) {
4646
logged = true
4747
break

0 commit comments

Comments
 (0)