fathom/Dockerfile

24 lines
797 B
Docker
Raw Normal View History

FROM node:alpine AS assetbuilder
WORKDIR /app
COPY package*.json ./
COPY gulpfile.js ./
COPY assets/ ./assets/
2018-11-14 10:48:54 +00:00
RUN npm install && NODE_ENV=production ./node_modules/gulp/bin/gulp.js
FROM golang:1.12.14-alpine3.9 AS binarybuilder
RUN apk add --no-cache git gcc musl-dev make
RUN go get -u github.com/gobuffalo/packr/packr
RUN go get -u github.com/usefathom/fathom
WORKDIR /go/src/github.com/usefathom/fathom
COPY . /go/src/github.com/usefathom/fathom
COPY --from=assetbuilder /app/assets/build ./assets/build
RUN make docker
FROM alpine:3.14
EXPOSE 8080
HEALTHCHECK --retries=10 CMD ["wget", "-qO-", "http://localhost:8080/health"]
RUN apk add --update --no-cache bash ca-certificates
WORKDIR /app
COPY --from=binarybuilder /go/src/github.com/usefathom/fathom/fathom .
2018-05-14 14:34:13 +00:00
CMD ["./fathom", "server"]