Make ping not use docker/docker and update Dockerfiles

This commit is contained in:
Marcos Lilljedahl
2017-11-09 15:28:31 -03:00
parent 0c1320da00
commit 3db75cd297
4 changed files with 4 additions and 19 deletions

View File

@@ -4,8 +4,6 @@ COPY . /go/src/github.com/play-with-docker/play-with-docker
WORKDIR /go/src/github.com/play-with-docker/play-with-docker WORKDIR /go/src/github.com/play-with-docker/play-with-docker
RUN go get -v -d ./...
RUN ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null RUN ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null
RUN CGO_ENABLED=0 go build -a -installsuffix nocgo -o /go/bin/play-with-docker . RUN CGO_ENABLED=0 go build -a -installsuffix nocgo -o /go/bin/play-with-docker .

View File

@@ -1,11 +1,10 @@
FROM golang:1.8 FROM golang:1.9
# Copy the runtime dockerfile into the context as Dockerfile # Copy the runtime dockerfile into the context as Dockerfile
COPY . /go/src/github.com/play-with-docker/play-with-docker COPY . /go/src/github.com/play-with-docker/play-with-docker
WORKDIR /go/src/github.com/play-with-docker/play-with-docker WORKDIR /go/src/github.com/play-with-docker/play-with-docker
RUN go get -v -d ./...
RUN ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null RUN ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key >/dev/null

14
Gopkg.lock generated
View File

@@ -84,18 +84,6 @@
packages = ["query"] packages = ["query"]
revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a" revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a"
[[projects]]
branch = "master"
name = "github.com/googollee/go-engine.io"
packages = [".","message","parser","polling","transport","websocket"]
revision = "80ae0e43aca17b4c5a6834999d0f2eaa16b9afda"
[[projects]]
branch = "master"
name = "github.com/googollee/go-socket.io"
packages = ["."]
revision = "5447e71f36d394766bf855d5714a487596809f0d"
[[projects]] [[projects]]
name = "github.com/gorilla/context" name = "github.com/gorilla/context"
packages = ["."] packages = ["."]
@@ -290,6 +278,6 @@
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"
analyzer-version = 1 analyzer-version = 1
inputs-digest = "235d01ea73c9f692dddf5fcf203a99dcd2ad75c6ef0fc3d51a60bf949d4fbdc9" inputs-digest = "b4e3f9681dc0f331b539efe648984eff43aaf82270bee1adfad1a7aa07732ffa"
solver-name = "gps-cdcl" solver-name = "gps-cdcl"
solver-version = 1 solver-version = 1

View File

@@ -6,7 +6,7 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/docker/docker/client" docker "docker.io/go-docker"
"github.com/play-with-docker/play-with-docker/config" "github.com/play-with-docker/play-with-docker/config"
"github.com/shirou/gopsutil/load" "github.com/shirou/gopsutil/load"
) )
@@ -14,7 +14,7 @@ import (
func Ping(rw http.ResponseWriter, req *http.Request) { func Ping(rw http.ResponseWriter, req *http.Request) {
// Get system load average of the last 5 minutes and compare it against a threashold. // Get system load average of the last 5 minutes and compare it against a threashold.
c, err := client.NewEnvClient() c, err := docker.NewEnvClient()
if err != nil { if err != nil {
rw.WriteHeader(http.StatusInternalServerError) rw.WriteHeader(http.StatusInternalServerError)