Skip to content

Commit 4262a20

Browse files
committed
BUILD: docker: use usr/local/etc/haproxy as base dir
/etc/haproxy is just a symlink to /usr/local/etc/haproxy, copying whole folder deleted the symlink in some builds
1 parent 9f08067 commit 4262a20

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

build/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ RUN mkdir -p /var/run/vars && \
3838

3939
FROM haproxytech/haproxy-alpine:2.3
4040

41-
COPY /fs /
41+
COPY /fs/start.sh /
42+
COPY /fs/usr/local/etc/haproxy/haproxy.cfg /usr/local/etc/haproxy/
4243
COPY --from=builder /src/fs/haproxy-ingress-controller .
4344

4445
ARG DUMB_INIT_SHA256=cd7ab5513d20f4b985012d264fbdee60ccd2ea528b94b4b9308c6c6d26f8ba90
4546

4647
RUN apk --no-cache add socat openssl util-linux htop tzdata && \
4748
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 && \
4849
rm -f /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
49-
rm -f /usr/local/etc/haproxy/haproxy.cfg && \
5050
echo "$DUMB_INIT_SHA256 /dumb-init" | sha256sum -c - && \
5151
chmod +x /dumb-init &&\
52-
chgrp -R haproxy /etc/haproxy /run /var &&\
53-
chmod -R g+w /etc/haproxy /run /var
52+
chgrp -R haproxy /usr/local/etc/haproxy /run /var && \
53+
chmod -R g+w /usr/local/etc/haproxy /run /var
5454

5555
ENTRYPOINT ["/dumb-init", "--", "/start.sh"]

controller/annotations_test/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (suite *AnnotationSuite) SetupSuite() {
2222
if err != nil {
2323
panic(err)
2424
}
25-
suite.client, err = api.Init(suite.transactionDir, "../../fs/etc/haproxy/haproxy.cfg", "haproxy", "")
25+
suite.client, err = api.Init(suite.transactionDir, "../../fs/usr/local/etc/haproxy/haproxy.cfg", "haproxy", "")
2626
suite.Nil(err)
2727
suite.NoError(suite.client.APIStartTransaction())
2828
}
File renamed without changes.

0 commit comments

Comments
 (0)