Adds some dockerfile

This commit is contained in:
2016-02-16 11:56:41 +01:00
parent 8e01f5f3a3
commit 141c359751

32
Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM node:5.6.0
MAINTAINER Alexandre Tuleu <alexandre.tuleu.2005@polytechnique.org>
ENV GOLANG_VERSION 1.5.3
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256 43afe0c5017e502630b1aea4d44b8a7f059bf60d7f29dfd58db454d4e4e0ae53
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
RUN mkdir -p /satbd
WORKDIR /satbd
RUN npm install -g gulp
COPY . /satbd
RUN go get $(go list -e -f "{{.Imports}} {{.TestImports}}" . | tr "[" " " | tr "]" " " | xargs go list -e -f "{{if not .Standard}}{{.ImportPath}}{{end}}")
RUN go build
RUN go test
RUN gulp build
EXPOSE 33276
CMD ["./satbd-explorer"]