Passport/Dockerfile

21 lines
390 B
Docker
Raw Normal View History

2024-01-30 10:34:37 +00:00
# Building Backend
2024-02-18 03:20:22 +00:00
FROM golang:alpine as identity-server
2024-01-30 10:34:37 +00:00
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
2024-02-18 03:20:22 +00:00
COPY --from=identity-server /dist /identity/server
2024-01-30 10:34:37 +00:00
EXPOSE 8444
2024-02-18 03:20:22 +00:00
CMD ["/identity/server"]