-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (40 loc) · 1.36 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
# Use an official Ubuntu base image
FROM ubuntu:20.04
# Set environment variables for non-interactive installs
ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install basic tools
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
python3-pip \
python3-venv \
lsb-release \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 20
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs
# Verify Node.js and npm installation
RUN node -v && npm -v
# Install Chia Dev Tools from PyPI globally so 'run' and 'brun' are available system-wide
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install --extra-index-url https://pypi.chia.net/simple/ chia-dev-tools
# Set working directory to /usr/src/app for the Express app
WORKDIR /usr/src/app
# Copy package.json and package-lock.json for dependency installation
COPY package*.json ./
# Install npm dependencies for the Express server
RUN npm install
# Copy the rest of the application files
COPY . .
# Build the TypeScript project
RUN npm run build
# Expose the necessary ports for the CLVM server
EXPOSE 4363
# Command to start the Express server
CMD ["npm", "start"]