Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Docker API #108

Merged
merged 6 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
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
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

44 changes: 44 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM alpine:3.6 AS builder

ARG GOLANG_VERSION=1.8.4-r0

RUN apk update
RUN apk add go=${GOLANG_VERSION} go-tools=${GOLANG_VERSION} git musl-dev
RUN go version

ENV GOPATH=/go
ENV PATH=${PATH}:/go/bin
ENV CGO_ENABLED=0

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/aacebedo/dnsdock

WORKDIR /go/src/github.com/aacebedo/dnsdock

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

RUN mkdir /tmp/output

WORKDIR /go/src/github.com/aacebedo/dnsdock

ENV GIT_SSL_NO_VERIFY=true

RUN godep restore

ENV GOARCH=amd64

WORKDIR /go/src/github.com/aacebedo/dnsdock/src

RUN govvv build -o /tmp/output/dnsdock

FROM alpine:3.18.2

ENV GOARCH=amd64

COPY --from=builder /tmp/output/dnsdock /bin/dnsdock

ENTRYPOINT ["dnsdock"]
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build:
docker build -t dnsdock:latest .

build-test:
docker build -t dnsdock:test . --progress=plain --no-cache
2 changes: 1 addition & 1 deletion src/core/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.44", nil, defaultHeaders)

if err != nil {
return nil, err
Expand Down