mirror of
https://github.com/dstotijn/hetty
synced 2024-11-30 07:30:32 +00:00
28 lines
No EOL
599 B
Docker
28 lines
No EOL
599 B
Docker
ARG GO_VERSION=1.15
|
|
ARG CGO_ENABLED=0
|
|
ARG NODE_VERSION=14.11
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS go-builder
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY cmd ./cmd
|
|
COPY pkg ./pkg
|
|
RUN go build -o hetty ./cmd/hetty
|
|
|
|
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
|
|
|
|
ENTRYPOINT ["./hetty", "-adminPath=./admin"]
|
|
|
|
EXPOSE 8080 |