forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.node20fips
More file actions
32 lines (25 loc) · 1004 Bytes
/
Dockerfile.node20fips
File metadata and controls
32 lines (25 loc) · 1004 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
# Stage 1
FROM ubuntu:20.04 AS base
ARG ENABLE_FIPS
ARG DYNAMIC_LINK
ARG SHARED_OPENSSL_INCLUDES
ARG SHARED_OPENSSL_LIBNAME
ARG SHARED_OPENSSL_LIBPATH
# Set non-interactive mode to avoid prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary dependencies
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install -y build-essential python3 python3-distutils g++-10 make curl git pkg-config libssl-dev libffi-dev libgmp-dev libtool autoconf automake cmake wget xz-utils unzip vim
RUN rm -rf /var/lib/apt/lists/*
# Set g++ 10 as the default
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
# Copy local Node.js source into the image
WORKDIR /usr/src/node
COPY . .
RUN ./configure --openssl-is-fips
RUN ./configure --shared-openssl
RUN ./configure --experimental-enable-pointer-compression
RUN make -j4 install DESTDIR=./node-install
CMD ["bash"]