pull/49/head
Hunter Long 2018-08-17 17:07:33 -07:00
parent da2316cbe5
commit d39b700d3f
1 changed files with 9 additions and 20 deletions

View File

@ -1,30 +1,19 @@
FROM golang:1.10.3-alpine FROM golang:1.10.3-alpine
MAINTAINER "Hunter Long (https://github.com/hunterlong)" MAINTAINER "Hunter Long (https://github.com/hunterlong)"
# Statup 'test' image for running a full test using the production environment # Statup 'test' image for running a full test using the production environment
ENV VERSION=$(VERSION)
RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl RUN apk add --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl
RUN curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep && \ RUN curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep && \
chmod +x $GOPATH/bin/dep chmod +x $GOPATH/bin/dep && \
curl -L -s https://assets.statup.io/sass -o /usr/local/bin/sass && \
WORKDIR $GOPATH/src/github.com/hunterlong/statup chmod +x /usr/local/bin/sass
COPY . .
RUN wget -q https://assets.statup.io/sass && \
chmod +x sass && \
mv sass /usr/local/bin/sass
RUN dep ensure && \
go get github.com/GeertJohan/go.rice/rice
RUN cd cmd && go build -ldflags "-X main.VERSION=$VERSION" && mv cmd /usr/local/bin/statup
ENV VERSION=$(VERSION)
ENV IS_DOCKER=true ENV IS_DOCKER=true
WORKDIR /app WORKDIR $GOPATH/src/github.com/hunterlong/statup
ADD ./Makefile . COPY . .
RUN make dev-deps && make install
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT statup ENTRYPOINT make run