mirror of https://github.com/statping/statping
45 lines
1.4 KiB
Docker
45 lines
1.4 KiB
Docker
FROM golang:1.13.5-alpine
|
|
LABEL maintainer="Hunter Long (https://github.com/hunterlong)"
|
|
ARG VERSION
|
|
RUN apk add --update --no-cache libstdc++ gcc g++ make git ca-certificates linux-headers wget curl jq libsass nodejs nodejs-npm
|
|
RUN npm install -g yarn
|
|
|
|
RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \
|
|
chmod +x /usr/local/bin/sass
|
|
|
|
WORKDIR /go/src/github.com/hunterlong/statping
|
|
|
|
ADD go.mod go.sum version.txt ./
|
|
|
|
RUN go mod download
|
|
|
|
RUN go get github.com/stretchr/testify/assert && \
|
|
go get golang.org/x/tools/cmd/cover && \
|
|
go get github.com/mattn/goveralls && \
|
|
go install github.com/mattn/goveralls && \
|
|
go get github.com/rendon/testcli && \
|
|
go get github.com/robertkrimen/godocdown/godocdown && \
|
|
go get github.com/crazy-max/xgo && \
|
|
go get github.com/GeertJohan/go.rice && \
|
|
go get github.com/GeertJohan/go.rice/rice && \
|
|
go get github.com/axw/gocov/gocov && \
|
|
go get github.com/matm/gocov-html && \
|
|
go get github.com/fatih/structs && \
|
|
go get github.com/ararog/timeago && \
|
|
go get gopkg.in/natefinch/lumberjack.v2 && \
|
|
go get golang.org/x/crypto/bcrypt
|
|
|
|
ADD frontend/package.json frontend/yarn.lock ./frontend/
|
|
|
|
RUN cd frontend && yarn install --pure-lockfile --network-timeout 1000000 && \
|
|
yarn cache clean
|
|
|
|
ADD . ./
|
|
|
|
RUN make clean frontend-build compile
|
|
RUN make build
|
|
RUN chmod a+x statping && mv statping /go/bin/statping
|
|
|
|
WORKDIR /app
|
|
|