-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (19 loc) · 801 Bytes
/
Dockerfile
File metadata and controls
22 lines (19 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM node:12.0-slim AS fe
LABEL maintainer="CerealBoy <allan.shone@gmail.com>"
COPY . .
RUN yarn && yarn build
FROM golang:alpine AS bin
WORKDIR /ad
COPY . .
COPY --from=fe ["dist/", "dist/"]
RUN apk add ca-certificates git && \
update-ca-certificates && \
GO111MODULE=off go get -u github.com/kevinburke/go-bindata/... && \
go-bindata -o auto-docs/server/assets.go --prefix dist/ dist/... && \
sed -i "s/package main/package server/" auto-docs/server/assets.go && \
GO111MODULE=on go mod download && \
GO111MODULE=on go build -ldflags "-X main.GitCommit=$(git tag -l | head -n 1)" -o /auto-docs ./auto-docs
FROM golang:alpine AS release
ENTRYPOINT ["/auto-docs"]
RUN apk --no-cache add ca-certificates && update-ca-certificates
COPY --from=bin ["/auto-docs", "/auto-docs"]