Passport/Dockerfile

22 lines
392 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/views
2024-01-30 10:34:37 +00:00
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
CMD ["/identity/server"]