Skip to content

Commit

Permalink
change docker api version
Browse files Browse the repository at this point in the history
  • Loading branch information
Petar Petrov committed Jan 21, 2024
1 parent 93fd59a commit 022eba5
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 29 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ RUN go get -v github.com/tools/godep
# RUN go get -u github.com/golang/lint/golint
RUN go get github.com/ahmetb/govvv

RUN mkdir -p /go/src/github.com/p1c2u/dnsdock
RUN mkdir -p /go/src/github.com/dz3n/dnsdock

WORKDIR /go/src/github.com/p1c2u/dnsdock
WORKDIR /go/src/github.com/dz3n/dnsdock

RUN git clone https://github.com/p1c2u/dnsdock /go/src/github.com/p1c2u/dnsdock
RUN git clone https://github.com/dz3n/dnsdock /go/src/github.com/dz3n/dnsdock
# RUN git checkout {{$GIT_COMMIT}}

RUN mkdir /tmp/output

WORKDIR /go/src/github.com/p1c2u/dnsdock
WORKDIR /go/src/github.com/dz3n/dnsdock

ENV GIT_SSL_NO_VERIFY=true

RUN godep restore

ENV GOARCH=arm64

WORKDIR /go/src/github.com/p1c2u/dnsdock/src
WORKDIR /go/src/github.com/dz3n/dnsdock/src

RUN govvv build -o /tmp/output/dnsdock

Expand Down
2 changes: 1 addition & 1 deletion Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
dnsdock:
image: p1c2u/dnsdock
image: dz3n/dnsdock
container_name: dnsdock
command: -nameserver 192.168.0.1:53 -nameserver 8.8.8.8:53
volumes:
Expand Down
20 changes: 10 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://secure.travis-ci.org/p1c2u/dnsdock.png)](http://travis-ci.org/p1c2u/dnsdock)
[![Build Status](https://secure.travis-ci.org/dz3n/dnsdock.png)](http://travis-ci.org/dz3n/dnsdock)


## dnsdock
Expand Down Expand Up @@ -48,10 +48,10 @@ Install a golang development environment on your host and type the following com
export GOPATH=/tmp/go
export PATH=${PATH}:${GOPATH}/bin
go get -v github.com/tools/godep
go get -d -v https://github.com/p1c2u/dnsdock
cd ${GOPATH}/src/github.com/p1c2u/dnsdock
go get -d -v https://github.com/dz3n/dnsdock
cd ${GOPATH}/src/github.com/dz3n/dnsdock
godep restore
cd ${GOPATH}/src/github.com/p1c2u/dnsdock/src
cd ${GOPATH}/src/github.com/dz3n/dnsdock/src
go build -o ${GOPATH}/bin/dnsdock
```

Expand All @@ -60,7 +60,7 @@ go build -o ${GOPATH}/bin/dnsdock
To build with docker you need [rocker](https://github.com/grammarly/rocker). Check the
website to install it and type the following commands:
```
git clone https://github.com/p1c2u/dnsdock <clone_directory_path>
git clone https://github.com/dz3n/dnsdock <clone_directory_path>
rocker build -var ARCH=[amd64|arm] -var OUTPUT_DIR=<outputdir> <clone_directory_path>
```

Expand Down Expand Up @@ -123,7 +123,7 @@ Restart docker daemon after you have done that (`sudo service docker restart`).
Now you only need to run the dnsdock container:

```
docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name dnsdock -p 172.17.0.1:53:53/udp p1c2u/dnsdock [--opts]
docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name dnsdock -p 172.17.0.1:53:53/udp dz3n/dnsdock [--opts]
```

- `-d` starts container as daemon
Expand Down Expand Up @@ -159,7 +159,7 @@ If you also want to let the host machine discover the containers add `nameserver
Mounting docker daemon's unix socket may not work with default configuration on
these platforms. Please use
[selinux-dockersock](https://github.com/dpw/selinux-dockersock) to fix this.
More information in [#11](https://github.com/p1c2u/dnsdock/issues/11).
More information in [#11](https://github.com/dz3n/dnsdock/issues/11).

#### TLS Authentication

Expand All @@ -174,7 +174,7 @@ and the `DOCKER_CERTS` to a directory containing files named `ca.pem`,
You may build this into your own container with this example Dockerfile:

```
FROM p1c2u/dnsdock
FROM dz3n/dnsdock
ENV DOCKER_TLS_VERIFY 1
ENV DOCKER_CERTS /certs
Expand Down Expand Up @@ -314,8 +314,8 @@ Add the following snippet under the `units` part:
[Service]
EnvironmentFile=/etc/environment
ExecStartPre=/bin/sh -c '/usr/bin/docker rm -f dnsdock || ls > /dev/null'
ExecStartPre=/bin/sh -c '/usr/bin/docker pull p1c2u/dnsdock'
ExecStart=/usr/bin/docker run -v /var/run/docker.sock:/var/run/docker.sock --name dnsdock -p ${COREOS_PRIVATE_IPV4}:53:53/udp p1c2u/dnsdock
ExecStartPre=/bin/sh -c '/usr/bin/docker pull dz3n/dnsdock'
ExecStart=/usr/bin/docker run -v /var/run/docker.sock:/var/run/docker.sock --name dnsdock -p ${COREOS_PRIVATE_IPV4}:53:53/udp dz3n/dnsdock
ExecStop=/bin/sh -c '/usr/bin/docker stop dnsdock || ls > /dev/null'
```

Expand Down
2 changes: 1 addition & 1 deletion src/core/cmdline.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package core

import (
"fmt"
"github.com/p1c2u/dnsdock/src/utils"
"github.com/dz3n/dnsdock/src/utils"
"gopkg.in/alecthomas/kingpin.v2"
"strconv"
)
Expand Down
6 changes: 3 additions & 3 deletions src/core/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ package core
import (
"crypto/tls"
"errors"
"github.com/p1c2u/dnsdock/src/servers"
"github.com/p1c2u/dnsdock/src/utils"
"github.com/dz3n/dnsdock/src/servers"
"github.com/dz3n/dnsdock/src/utils"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
eventtypes "github.com/docker/engine-api/types/events"
Expand All @@ -35,7 +35,7 @@ type DockerManager struct {
// NewDockerManager creates a new DockerManager
func NewDockerManager(c *utils.Config, list servers.ServiceListProvider, tlsConfig *tls.Config) (*DockerManager, error) {
defaultHeaders := map[string]string{"User-Agent": "engine-api-cli-1.0"}
dclient, err := client.NewClient(c.DockerHost, "v1.22", nil, defaultHeaders)
dclient, err := client.NewClient(c.DockerHost, "v1.30", nil, defaultHeaders)

if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion src/core/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package core

import (
"github.com/p1c2u/dnsdock/src/servers"
"github.com/dz3n/dnsdock/src/servers"
"reflect"
"testing"
)
Expand Down
6 changes: 3 additions & 3 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ package main
import (
"crypto/tls"
"crypto/x509"
"github.com/p1c2u/dnsdock/src/core"
"github.com/p1c2u/dnsdock/src/servers"
"github.com/p1c2u/dnsdock/src/utils"
"github.com/dz3n/dnsdock/src/core"
"github.com/dz3n/dnsdock/src/servers"
"github.com/dz3n/dnsdock/src/utils"
"github.com/op/go-logging"
"io/ioutil"
"os"
Expand Down
2 changes: 1 addition & 1 deletion src/servers/dnsserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package servers
import (
"errors"
"fmt"
"github.com/p1c2u/dnsdock/src/utils"
"github.com/dz3n/dnsdock/src/utils"
"github.com/miekg/dns"
"net"
"regexp"
Expand Down
2 changes: 1 addition & 1 deletion src/servers/dnsserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package servers

import (
"github.com/p1c2u/dnsdock/src/utils"
"github.com/dz3n/dnsdock/src/utils"
"github.com/miekg/dns"
"net"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion src/servers/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package servers

import (
"encoding/json"
"github.com/p1c2u/dnsdock/src/utils"
"github.com/dz3n/dnsdock/src/utils"
"github.com/gorilla/mux"
"net/http"
)
Expand Down
2 changes: 1 addition & 1 deletion src/servers/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package servers

import (
"github.com/p1c2u/dnsdock/src/utils"
"github.com/dz3n/dnsdock/src/utils"
"io/ioutil"
"net/http"
"strings"
Expand Down

0 comments on commit 022eba5

Please sign in to comment.