<commit_before>FROM golang:alpine as builder
COPY . $GOPATH/src/github.com/supergiant/control/
WORKDIR $GOPATH/src/github.com/supergiant/control/

ARG ARCH=amd64

RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
    go build -a -installsuffix cgo -ldflags='-extldflags "-static" -w -s' -o /go/bin/supergiant ./cmd/controlplane

RUN apk --update add ca-certificates

FROM node:10-alpine as ui-builder

COPY ./cmd/ui/ /
WORKDIR /assets

RUN npm install
RUN npm run build

FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /go/bin/supergiant /bin/supergiant
COPY --from=builder /go/src/github.com/supergiant/control/templates /etc/supergiant/templates
COPY --from=ui-builder /assets/dist /etc/supergiant/ui

ENTRYPOINT ["/bin/supergiant", "-ui-dir", "/etc/supergiant/ui"]<commit_msg>Fix docker compose build (#1065)<commit_after>FROM golang:alpine as builder
COPY . $GOPATH/src/github.com/supergiant/control/
WORKDIR $GOPATH/src/github.com/supergiant/control/

ARG ARCH=amd64

RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
    go build -a -installsuffix cgo -ldflags='-extldflags "-static" -w -s' -o /go/bin/supergiant ./cmd/controlplane

RUN apk --update add ca-certificates

FROM node:11.3.0-alpine as ui-builder

COPY ./cmd/ui/ /
WORKDIR /assets

RUN npm rebuild node-sass
RUN npm install
RUN npm run build

FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /go/bin/supergiant /bin/supergiant
COPY --from=builder /go/src/github.com/supergiant/control/templates /etc/supergiant/templates
COPY --from=ui-builder /assets/dist /etc/supergiant/ui

ENTRYPOINT ["/bin/supergiant", "-ui-dir", "/etc/supergiant/ui"]
{'fraction_non_alphanumeric': 0.14065180102915953, 'fraction_numerical': 0.009148084619782733, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4243534', 'n_tokens_mistral': 673, 'n_tokens_neox': 644, 'n_words': 143}