2020-09-24 20:28:37 +00:00
|
|
|
ARG GO_VERSION=1.15
|
2020-10-04 09:50:03 +00:00
|
|
|
ARG CGO_ENABLED=1
|
2020-09-24 20:28:37 +00:00
|
|
|
ARG NODE_VERSION=14.11
|
|
|
|
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS go-builder
|
|
|
|
WORKDIR /app
|
2020-10-04 09:50:03 +00:00
|
|
|
RUN apk add --no-cache build-base
|
2020-09-24 20:28:37 +00:00
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY cmd ./cmd
|
|
|
|
COPY pkg ./pkg
|
2020-09-25 19:16:30 +00:00
|
|
|
RUN go build -o hetty ./cmd/hetty
|
2020-09-24 20:28:37 +00:00
|
|
|
|
|
|
|
FROM node:${NODE_VERSION}-alpine AS node-builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY admin/package.json admin/yarn.lock ./
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
COPY admin/ .
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
RUN yarn run export
|
|
|
|
|
|
|
|
FROM alpine:3.12
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=go-builder /app/hetty .
|
|
|
|
COPY --from=node-builder /app/dist admin
|
|
|
|
|
2020-09-25 00:53:41 +00:00
|
|
|
ENTRYPOINT ["./hetty", "-adminPath=./admin"]
|
2020-09-24 20:28:37 +00:00
|
|
|
|
2020-09-28 18:41:43 +00:00
|
|
|
EXPOSE 8080
|