Skip to content

Commit

Permalink
312: include Node 20.9.0 toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
jac18281828 committed Nov 6, 2023
1 parent c78f0ed commit f2e9515
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \

RUN useradd --create-home -s /bin/bash xmtp
RUN usermod -a -G sudo xmtp
RUN echo '%xmtp ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

WORKDIR /rustup
## Rust
Expand All @@ -42,7 +42,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt install -y -q --no-install-recommends \
ca-certificates apt-transport-https \
sudo ripgrep procps build-essential \
python3 python3-pip python3-dev git && \
python3 python3-pip python3-dev \
git curl && \
apt clean && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -52,7 +53,25 @@ RUN useradd --create-home -s /bin/bash xmtp
RUN usermod -a -G sudo xmtp
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

## Rust
## Node and NPM
RUN mkdir -p /usr/local/nvm
ENV NVM_DIR=/usr/local/nvm

ENV NODE_VERSION=v20.9.0

ADD https://raw.githubusercontent.com/creationix/nvm/master/install.sh /usr/local/etc/nvm/install.sh
RUN bash /usr/local/etc/nvm/install.sh && \
bash -c ". $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default"

ENV NVM_NODE_PATH ${NVM_DIR}/versions/node/${NODE_VERSION}
ENV NODE_PATH ${NVM_NODE_PATH}/lib/node_modules
ENV PATH ${NVM_NODE_PATH}/bin:$PATH

RUN npm install npm -g
RUN npm install yarn -g


## Rust from builder
COPY --chown=xmtp:xmtp --from=builder /home/xmtp/.cargo /home/xmtp/.cargo
COPY --chown=xmtp:xmtp --from=builder /home/xmtp/.rustup /home/xmtp/.rustup

Expand Down

0 comments on commit f2e9515

Please sign in to comment.