chrly/Dockerfile

33 lines
857 B
Docker
Raw Normal View History

FROM golang:1.9-alpine
2016-10-11 20:50:17 +05:30
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
2017-08-15 03:14:27 +05:30
COPY ./Gopkg.* /go/src/app/
COPY ./main.go /go/src/app/
COPY ./bootstrap /go/src/app/bootstrap
2017-08-15 03:14:27 +05:30
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 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
2017-08-15 03:14:27 +05:30
ENTRYPOINT ["minecraft-skinsystem"]
CMD ["serve"]