Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +14 -12
Dockerfile
CHANGED
@@ -1,21 +1,23 @@
|
|
1 |
-
# Start
|
2 |
FROM node:18-alpine
|
3 |
|
4 |
-
# Set up working directory
|
5 |
-
WORKDIR /app
|
6 |
-
|
7 |
# Install Git
|
8 |
RUN apk add --no-cache git
|
9 |
|
10 |
-
#
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
#
|
14 |
-
RUN
|
15 |
-
RUN git remote add origin https://www.github.com/smogon/pokemon-showdown.git
|
16 |
|
17 |
-
# Expose
|
18 |
EXPOSE 8000
|
19 |
|
20 |
-
#
|
21 |
-
|
|
|
1 |
+
# Start with Node.js 18 on Alpine
|
2 |
FROM node:18-alpine
|
3 |
|
|
|
|
|
|
|
4 |
# Install Git
|
5 |
RUN apk add --no-cache git
|
6 |
|
7 |
+
# Create the working directory inside the container
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# Clone the repo (you can specify a branch or commit if desired)
|
11 |
+
RUN git clone https://github.com/smogon/pokemon-showdown.git .
|
12 |
+
|
13 |
+
# Install the npm dependencies
|
14 |
+
RUN npm install
|
15 |
|
16 |
+
# Copy the example config to config.js (or provide your own)
|
17 |
+
RUN cp config/config-example.js config/config.js
|
|
|
18 |
|
19 |
+
# Expose the default Showdown port
|
20 |
EXPOSE 8000
|
21 |
|
22 |
+
# Finally, run Showdown
|
23 |
+
CMD ["node", "pokemon-showdown", "start"]
|