forked from a16z-infra/ai-town
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (43 loc) · 1.24 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
48
49
50
51
52
53
54
# Use an Ubuntu base image
FROM ubuntu:22.04
# Install dependencies
RUN apt-get update && \
apt-get install -y \
curl \
python3 \
python3-pip \
unzip \
socat \
build-essential \
libssl-dev \
iproute2 \
&& rm -rf /var/lib/apt/lists/*
# Install NVM, Node.js, and npm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash && \
export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
nvm install 18 && \
nvm use 18
# Add NVM to PATH
ENV NVM_DIR /root/.nvm
ENV NODE_VERSION 18.0.0
RUN . $NVM_DIR/nvm.sh && nvm install $NODE_VERSION
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Install Rust and Cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
. "$HOME/.cargo/env"
# Install just
RUN . "$HOME/.cargo/env" && cargo install just
# Set the working directory
WORKDIR /usr/src/app
# Copy dependency files
COPY package*.json ./
# Install npm dependencies
RUN npm install
# Copy application files
COPY . .
# Expose necessary ports
EXPOSE 5173
# Set the entry point to keep the container active
CMD ["tail", "-f", "/dev/null"]