-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
37 lines (25 loc) · 926 Bytes
/
Dockerfile
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
37
FROM node:22.11-alpine AS build
ENV NODE_VERSION=22.11.0
WORKDIR /app
# Install dependencies. the `node_modules` folder is in /app
COPY auth/package.json .
COPY auth/package-lock.json .
RUN npm ci
# Application lays in /app/src
COPY ./auth ./
# Now the source-files can be transpiled
RUN npm run build
RUN npm prune --production
FROM node:23.0-alpine
LABEL org.opencontainers.image.title="OpenSlides Authentication Service"
LABEL org.opencontainers.image.description="Service for OpenSlides which handles the authentication of users."
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/openslides-auth-service"
WORKDIR /app
COPY --from=build /app/build .
COPY --from=build /app/entrypoint.sh .
COPY --from=build /app/wait-for.sh .
COPY --from=build /app/node_modules ./node_modules
EXPOSE 9004
ENTRYPOINT ["./entrypoint.sh"]
CMD ["node", "index.js"]