-
Notifications
You must be signed in to change notification settings - Fork 13
/
dockerfile
47 lines (37 loc) · 1.02 KB
/
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
38
39
40
41
42
43
44
45
46
47
FROM node:lts-bookworm
# Install dependencies for Rust, wasm-pack, and glibc development headers
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
build-essential \
ca-certificates \
git \
pkg-config \
libssl-dev \
libc6-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Rust using rustup
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# Set environment variables for Rust
ENV PATH="/root/.cargo/bin:${PATH}"
# Install wasm-pack using Cargo
RUN cargo install wasm-pack
ENV WASM_BINDGEN_PATH="/root/.cargo/bin/wasm-bindgen"
# Set the working directory inside the container
WORKDIR /app
VOLUME /app/build
# Copy package.json and package-lock.json
# to leverage Docker cache
COPY ./*.sh ./
COPY package*.json ./
COPY patches ./patches
COPY externals ./externals
COPY *.js ./
COPY *.mjs ./
COPY *.json ./
COPY src ./src
RUN git init
# Install entrypoint script
COPY ./.docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set the entrypoint
ENTRYPOINT ["/entrypoint.sh"]