Skip to content

Commit c56b0fa

Browse files
committed
fix(account-service): rebuild bcrypt for FIPS image compatibility
1 parent e1c2532 commit c56b0fa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ee/apps/account-service/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ WORKDIR /app/ee/apps/${SERVICE}
8888

8989
RUN yarn workspaces focus --production
9090

91+
# Build a glibc-compatible bcrypt package to be copied into the FIPS runtime image.
92+
FROM node:22.22.1-bookworm-slim AS fips-bcrypt
93+
WORKDIR /tmp/fips-bcrypt
94+
RUN npm init -y && npm install bcrypt@5.1.1 --omit=dev
95+
9196
FROM node:22.16.0-alpine3.21 AS release-standard
9297

9398
ARG SERVICE
@@ -121,6 +126,8 @@ ARG SERVICE
121126
ENV NODE_ENV=production \
122127
PORT=3000
123128
COPY --chown=node:node --from=builder /app /app
129+
COPY --chown=node:node --from=fips-bcrypt /tmp/fips-bcrypt/node_modules/bcrypt /app/node_modules/bcrypt
130+
124131
WORKDIR /app/ee/apps/${SERVICE}
125132
USER node
126133
EXPOSE 3000 9458

0 commit comments

Comments
 (0)