mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
Go docker image uses old nodejs, split build into 2 stages so we can have better control over used nodejs and Go images
16 lines
485 B
Docker
16 lines
485 B
Docker
FROM node:8-alpine as nodejs-builder
|
|
RUN apk add --update make git
|
|
COPY . /unsee
|
|
RUN make -C /unsee webpack
|
|
|
|
FROM golang:1.9.2-alpine3.6 as go-builder
|
|
COPY --from=nodejs-builder /unsee /go/src/github.com/cloudflare/unsee
|
|
ARG VERSION
|
|
RUN apk add --update make git
|
|
RUN CGO_ENABLED=0 make -C /go/src/github.com/cloudflare/unsee VERSION="${VERSION:-dev}" unsee
|
|
|
|
FROM gcr.io/distroless/base
|
|
COPY --from=go-builder /go/src/github.com/cloudflare/unsee/unsee /unsee
|
|
EXPOSE 8080
|
|
CMD ["/unsee"]
|