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
Plaintext

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
ARG LINK=no
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 https://github.com/DrBu7cher/ory-selfservice-ui-node
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/; \
fi
RUN npm run build
USER 10000
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["npm run serve"]
EXPOSE 3000