Commit db26dbcf authored by zauberstuhl's avatar zauberstuhl
Browse files

Add DNS failover image

parent 93761156
Pipeline #2181 passed with stages
in 2 minutes and 55 seconds
FROM golang:1.12
ENV build_dir=/go/src/git.feneas.org/feneas/infrastructure
WORKDIR $build_dir
RUN git clone https://git.feneas.org/feneas/infrastructure/dns-failover.git
WORKDIR $build_dir/dns-failover
RUN go get -u github.com/golang/dep/cmd/dep
RUN dep ensure
RUN go build -o /tmp/dns-failover
FROM alpine:3.9
# install certificates
RUN apk update
RUN apk add ca-certificates
RUN rm -rf /var/cache/apk/*
RUN mkdir -p /home/dnsf
COPY --from=0 /tmp/dns-failover /home/dnsf/dns-failover
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /home/dnsf/dns-failover
RUN chmod +x /entrypoint.sh
WORKDIR /home/dnsf
ENTRYPOINT ["/entrypoint.sh"]
#!/bin/sh
appconf="/home/dnsf/config.toml"
if [ "$CONFIG" != "" ]; then
echo -ne "$CONFIG" > $appconf
fi
if [ "$CONFIG_FILE" != "" ]; then
cp -v $CONFIG_FILE $appconf
fi
/home/dnsf/dns-failover $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment