forked from logto-io/logto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.integration
More file actions
36 lines (26 loc) · 1022 Bytes
/
Dockerfile.integration
File metadata and controls
36 lines (26 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
### Dockerfile for integration tests ###
FROM node:22-alpine
WORKDIR /etc/logto
ENV CI=true
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV INTEGRATION_TEST=true
RUN npm add --location=global pnpm@^10.0.0
RUN apk add --no-cache python3 make g++ bash rsync
COPY . .
RUN pnpm i
# Set if dev features enabled
ARG dev_features_enabled
ENV DEV_FEATURES_ENABLED=${dev_features_enabled}
RUN pnpm -r build
# Keep behavior aligned with CI packaging
ENV SKIP_TAR=true
RUN ./.scripts/package.sh
# Note: The `nyc` version used here should align with the one used in the `core` package's
# `devDependencies` to avoid potential issues with instrumentation and coverage reporting.
# However, since `package.sh` will prune dev dependencies, we need to install `nyc` globally
# here.
# We can consider better handling of this in the future if it becomes a maintenance burden.
RUN npm add -g nyc@^18.0.0
COPY .scripts/integration/ /etc/logto/.scripts/integration/
EXPOSE 3001 3002
ENTRYPOINT ["/etc/logto/.scripts/integration/bootstrap.sh"]