* updated Go/iris * removed vendor from Go/iris * fixed golang ver in Go/iris * add go build, change go ver to 1.11.5
@@ -1,4 +1,4 @@
-FROM golang:1.10.1
+FROM golang:1.11.5
ADD ./ /go-std
WORKDIR /go-std
@@ -8,4 +8,5 @@ ENV GOPATH /go-std
ENV PATH ${GOPATH}/bin:${PATH}
RUN go get github.com/go-sql-driver/mysql
-CMD go run hello_mysql.go
+RUN go build -o hello_mysql hello_mysql.go
+CMD ./hello_mysql
@@ -9,4 +9,5 @@ ENV PATH ${GOPATH}/bin:${PATH}
RUN apt update -yqq && apt install -yqq libsasl2-dev
RUN go get gopkg.in/mgo.v2
-CMD go run hello_mongo.go
+RUN go build -o hello_mongo hello_mongo.go
+CMD ./hello_mongo
RUN go get github.com/lib/pq
-CMD go run hello_postgres.go
+RUN go build -o hello_postgres hello_postgres.go
+CMD ./hello_postgres
-CMD go run hello_mysql.go -prefork
+CMD ./hello_mysql -prefork