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 ./ RUN go mod download ENV GO111MODULE on RUN go get github.com/stretchr/testify/... && \ go get github.com/GeertJohan/go.rice/rice && \ go get github.com/cortesi/modd/cmd/modd ADD frontend/package.json frontend/yarn.lock ./frontend/ RUN cd frontend && yarn install --pure-lockfile --network-timeout 1000000 && \ yarn cache clean COPY . ./ RUN make clean frontend-build compile RUN make build RUN chmod a+x statping && mv statping /go/bin/statping WORKDIR /app