Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
FROM debian:buster as builder
FROM debian:trixie as builder
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -q -y golang git-core && \
apt-get clean

ENV GOPATH=/root/go
RUN mkdir -p /root/go/src
COPY rest-api /root/go/src/dyndns
RUN cd /root/go/src/dyndns && go get && go test -v

FROM debian:buster-slim
WORKDIR /root/go/src/dyndns

RUN go mod init dyndns && \
go get -d -v && \
go test -v

RUN go build -o /root/go/bin/dyndns .

FROM debian:trixie-slim
MAINTAINER David Prandzioch <hello+ddns@davd.eu>

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
Expand All @@ -22,4 +29,4 @@ COPY named.conf.options /etc/bind/named.conf.options
COPY --from=builder /root/go/bin/dyndns /root/dyndns

EXPOSE 53 8080
CMD ["sh", "-c", "/root/setup.sh ; service bind9 start ; /root/dyndns"]
CMD ["sh", "-c", "/root/setup.sh ; service named start ; /root/dyndns"]