Spaces:
Running
Running
FROM ubuntu:22.04 | |
# Install prerequisites | |
RUN apt-get update -qq && \ | |
apt-get install -y git curl unzip wget gnupg build-essential && \ | |
rm -rf /var/lib/apt/lists/* | |
# Install Node.js 18 | |
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ | |
apt-get install -y nodejs | |
# Create user | |
RUN useradd -m -u 1000 user | |
USER user | |
# Set working directory to the user's home | |
WORKDIR /home/user | |
# Clone Pokémon Showdown | |
RUN git clone https://github.com/smogon/pokemon-showdown.git | |
# Change to the cloned directory and install deps | |
WORKDIR /home/user/pokemon-showdown | |
RUN npm install --production | |
# Expose default Showdown port | |
EXPOSE 7860 | |
# Run the server | |
CMD ["node", "pokemon-showdown","7860","start","--no-security"] |