statping/dev/Dockerfile.dev

37 lines
959 B
Docker
Raw Normal View History

2020-02-28 06:37:48 +00:00
FROM golang:1.13.5-alpine
LABEL maintainer="Hunter Long (https://github.com/hunterlong)"
2018-12-18 17:49:02 +00:00
ARG VERSION
2020-02-28 06:37:48 +00:00
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
2018-12-18 17:49:02 +00:00
RUN curl -L -s https://assets.statping.com/sass -o /usr/local/bin/sass && \
2018-08-18 00:07:33 +00:00
chmod +x /usr/local/bin/sass
2020-02-28 06:37:48 +00:00
2018-12-04 04:17:29 +00:00
WORKDIR /go/src/github.com/hunterlong/statping
2020-02-28 06:37:48 +00:00
ADD go.mod go.sum version.txt ./
RUN go mod download
2020-02-29 15:00:08 +00:00
RUN go get github.com/stretchr/testify/... && \
2020-02-28 06:37:48 +00:00
go get github.com/GeertJohan/go.rice/rice && \
2020-02-29 15:00:08 +00:00
go get github.com/cortesi/modd/cmd/modd
2020-02-28 06:37:48 +00:00
ADD frontend/package.json frontend/yarn.lock ./frontend/
2020-02-29 15:00:08 +00:00
RUN cd frontend && yarn install --pure-lockfile --network-timeout 1000000 && yarn cache clean
2018-08-19 08:48:02 +00:00
2018-12-18 17:49:02 +00:00
ENV IS_DOCKER=true
2020-02-28 06:37:48 +00:00
ENV STATPING_DIR=/go/src/github.com/hunterlong/statping
2020-02-29 15:00:08 +00:00
2020-02-28 06:37:48 +00:00
EXPOSE 8585
EXPOSE 8888
2020-02-29 15:00:08 +00:00
RUN cd frontend && yarn build && cp -R dist ../source/
RUN pwd && ls
COPY . .
2018-11-06 01:34:02 +00:00
2020-02-29 15:00:08 +00:00
CMD dev/dev-env.sh