Skip to content

Commit

Permalink
BUILD: docker: use usr/local/etc/haproxy as base dir
Browse files Browse the repository at this point in the history
/etc/haproxy is just a symlink to /usr/local/etc/haproxy,
copying whole folder deleted the symlink in some builds
  • Loading branch information
oktalz committed May 17, 2021
1 parent 9f08067 commit 4262a20
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ RUN mkdir -p /var/run/vars && \

FROM haproxytech/haproxy-alpine:2.3

COPY /fs /
COPY /fs/start.sh /
COPY /fs/usr/local/etc/haproxy/haproxy.cfg /usr/local/etc/haproxy/
COPY --from=builder /src/fs/haproxy-ingress-controller .

ARG DUMB_INIT_SHA256=cd7ab5513d20f4b985012d264fbdee60ccd2ea528b94b4b9308c6c6d26f8ba90

RUN apk --no-cache add socat openssl util-linux htop tzdata && \
wget --no-check-certificate -O /dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.4/dumb-init_1.2.4_x86_64 && \
rm -f /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
rm -f /usr/local/etc/haproxy/haproxy.cfg && \
echo "$DUMB_INIT_SHA256 /dumb-init" | sha256sum -c - && \
chmod +x /dumb-init &&\
chgrp -R haproxy /etc/haproxy /run /var &&\
chmod -R g+w /etc/haproxy /run /var
chgrp -R haproxy /usr/local/etc/haproxy /run /var && \
chmod -R g+w /usr/local/etc/haproxy /run /var

ENTRYPOINT ["/dumb-init", "--", "/start.sh"]
2 changes: 1 addition & 1 deletion controller/annotations_test/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (suite *AnnotationSuite) SetupSuite() {
if err != nil {
panic(err)
}
suite.client, err = api.Init(suite.transactionDir, "../../fs/etc/haproxy/haproxy.cfg", "haproxy", "")
suite.client, err = api.Init(suite.transactionDir, "../../fs/usr/local/etc/haproxy/haproxy.cfg", "haproxy", "")
suite.Nil(err)
suite.NoError(suite.client.APIStartTransaction())
}
Expand Down
File renamed without changes.

0 comments on commit 4262a20

Please sign in to comment.