You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1022 B

FROM node:18.12.1-alpine AS build
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN apk -U --no-cache --upgrade --latest add git
RUN adduser -S ory -D -u 10000 -s /bin/nologin
# This is a community-made version of the self-service ui.
# A requirement because there is no official workflow for joining Kratos and Hydra together
RUN git clone
WORKDIR /usr/src/app/ory-selfservice-ui-node
RUN git checkout add_hydra_consent_page
WORKDIR /usr/src/app
RUN cp ory-selfservice-ui-node/package.json .
RUN cp ory-selfservice-ui-node/package-lock.json .
RUN npm ci --fetch-timeout=600000
RUN cp -r ory-selfservice-ui-node/* .
RUN rm -rf ory-selfservice-ui-node .git
RUN if [ "$LINK" == "true" ]; then (cd ./contrib/sdk/generated; rm -rf node_modules; npm ci; npm run build); \
cp -r ./contrib/sdk/generated/* node_modules/@ory/kratos-client/; \
RUN npm run build
USER 10000
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["npm run serve"]