Passport/Dockerfile
LittleSheep 6d056b6e1d
All checks were successful
release-nightly / build-docker (push) Successful in 3m19s
🔨 Add workflow and dockerfile
2024-01-30 18:34:37 +08:00

21 lines
390 B
Docker

# Building Backend
FROM golang:alpine as passport-server
RUN apk add nodejs npm
WORKDIR /source
COPY . .
WORKDIR /source/pkg/view
RUN npm install
RUN npm run build
WORKDIR /source
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs -o /dist ./pkg/cmd/main.go
# Runtime
FROM golang:alpine
COPY --from=passport-server /dist /passport/server
EXPOSE 8444
CMD ["/passport/server"]