From 4945b3f98446f49169d2a1495575a0b5709dcc5b Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Tue, 15 Aug 2017 00:44:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6305a63..aa8d887 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,31 @@ FROM golang:1.9-alpine -RUN apk add --no-cache git -RUN apk add --no-cache git curl \ - && curl https://glide.sh/get | sh \ - && apk del curl - RUN mkdir -p /go/src/elyby/minecraft-skinsystem \ /go/src/elyby/minecraft-skinsystem/data/capes \ && ln -s /go/src/elyby/minecraft-skinsystem /go/src/app WORKDIR /go/src/app -COPY ./glide.* /go/src/app/ +COPY ./Gopkg.* /go/src/app/ +COPY ./main.go /go/src/app/ +COPY ./cmd /go/src/app/cmd +COPY ./daemon /go/src/app/daemon +COPY ./db /go/src/app/db +COPY ./model /go/src/app/model +COPY ./repositories /go/src/app/repositories +COPY ./ui /go/src/app/ui +COPY ./utils /go/src/app/utils -RUN glide install - -COPY ./minecraft-skinsystem.go /go/src/app/ -COPY ./lib /go/src/app/lib - -RUN go build minecraft-skinsystem.go \ - && mv minecraft-skinsystem /usr/local/bin/ +RUN apk add --no-cache git \ + && go get -u github.com/golang/dep/cmd/dep \ + && dep ensure \ + && go clean -i github.com/golang/dep \ + && rm -rf $GOPATH/src/github.com/golang/dep \ + && apk del git \ + && go build main.go \ + && mv main /usr/local/bin/minecraft-skinsystem EXPOSE 80 -VOLUME ["/go/src/app"] - -CMD ["minecraft-skinsystem"] +ENTRYPOINT ["minecraft-skinsystem"] +CMD ["serve"]