1
0
Fork 0
lifeto-shop/Dockerfile

20 lines
368 B
Docker
Raw Permalink Normal View History

2022-07-13 22:59:38 +00:00
FROM golang:1.18.2-alpine as GOBUILDER
WORKDIR /wd
COPY go.mod go.sum ./
COPY app ./app
RUN go mod tidy
RUN go build -o app.exe ./app
FROM node:18.1-alpine as NODEBUILDER
WORKDIR /wd
COPY . .
RUN npm install
RUN npx vite build
FROM alpine:3.16
WORKDIR /wd
COPY --from=GOBUILDER /wd/app.exe app.exe
COPY --from=NODEBUILDER /wd/dist dist
ENTRYPOINT [ "/wd/app.exe" ]