FROM golang:1.11
RUN go get github.com/gorilla/mux && \
go get github.com/gorilla/handlers && \
go get github.com/lib/pq && \
go get github.com/joho/godotenv && \
go get github.com/jinzhu/gorm
WORKDIR /go/src/application
ADD . .
RUN go build -o /service .
ENV PORT=8000
CMD ["/service "]
FROM golang:1.11
WORKDIR /go/src/application
ADD . .
RUN go get ./...
RUN go build -o /service .
ENV PORT=8000
CMD ["/service"]
https fetch: Get https://gopkg.in/goracle.v2?go-get=1: proxyconnect tcp: tls: oversized record received with length 20527
FROM golang:1.11
ADD ./ /go/src/application
WORKDIR /go/src/application
RUN go get ./...
RUN go build -o /service application
ENV PORT=8000
CMD ["/service"]
FROM alpine
это alpine(легковесная ОС для контейнеров)FROM debian
docker pull karalabe/xgo-latest
go get github.com/karalabe/xgo
xgo -targets linux/amd64 .
arch
(должна выдать x86_64 для amd64)go get github.com/karalabe/xgo
docker pull karalabe/xgo-latest
go get github.com/karalabe/xgo
xgo .