8000 fix go error (new dockerfile included) · Issue #76 · dstapp/docker-ddns · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
fix go error (new dockerfile included) #76
Open
@WiredLife

Description

@WiredLife

if you run in to this error

"=> ERROR [builder 5/5] RUN cd /root/go/src/dyndns && go get && go test -v 1.4s

[builder 5/5] RUN cd /root/go/src/dyndns && go get && go test -v:
1.340 # github.com/gorilla/mux
1.340 ../github.com/gorilla/mux/route.go:28:15: undefined: any
------"

use this dockerfile

FROM golang:1.19 AS builder
RUN DEBIAN_FRONTEND=noninteractive apt-get update &&
apt-get install -q -y 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 mod init dyndns && go mod tidy && go build -o dyndns .
FROM debian:buster-slim
MAINTAINER David Prandzioch hello+ddns@davd.eu
RUN DEBIAN_FRONTEND=noninteractive apt-get update &&
apt-get install -q -y bind9 dnsutils &&
apt-get clean
RUN chmod 770 /var/cache/bind
COPY setup.sh /root/setup.sh
RUN chmod +x /root/setup.sh
COPY named.conf.options /etc/bind/named.conf.options
COPY --from=builder /root/go/src/dyndns/dyndns /root/dyndns
EXPOSE 53 8080
CMD ["sh", "-c", "/root/setup.sh ; service bind9 start ; /root/dyndns"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0