otterscan/Dockerfile

25 lines
739 B
Docker
Raw Permalink Normal View History

2022-10-26 03:26:11 +00:00
FROM golang:1.19-alpine as gobuilder
RUN apk add alpine-sdk
WORKDIR /wd
COPY ["go.mod","go.sum","/wd/"]
COPY cmd cmd
RUN go build -o otter ./cmd/otter
2022-07-16 16:58:22 +00:00
FROM node:16.16.0-alpine3.15 AS builder
2022-10-25 08:52:54 +00:00
RUN apk add git subversion rsync
WORKDIR /otterscan-build
COPY ["package.json", "package-lock.json", "/otterscan-build/"]
RUN npm install
2022-10-25 08:52:54 +00:00
COPY ["tsconfig.json", "tsconfig.node.json", "postcss.config.js", "tailwind.config.js", "vite.config.ts", "index.html", "/otterscan-build/"]
COPY ["public", "/otterscan-build/public/"]
COPY ["src", "/otterscan-build/src/"]
2022-10-26 03:26:11 +00:00
RUN npm run build
2022-10-25 11:09:37 +00:00
2022-10-25 08:52:54 +00:00
FROM alpine:3.15.0
RUN apk add alpine-sdk
WORKDIR /wd
2022-10-25 10:20:17 +00:00
COPY --from=gobuilder /wd/otter /usr/bin/otter
2022-10-25 08:52:54 +00:00
COPY --from=builder /otterscan-build/dist /wd/dist
2022-10-26 03:26:11 +00:00
CMD ["otter"]