Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +16 -11
Dockerfile
CHANGED
|
@@ -1,23 +1,28 @@
|
|
| 1 |
-
# Use Node
|
| 2 |
FROM node:18-alpine
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
RUN apk add --no-cache git
|
| 6 |
-
|
| 7 |
-
# Set up working directory in the container
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
-
#
|
|
|
|
|
|
|
|
|
|
| 11 |
COPY . /app
|
| 12 |
|
| 13 |
-
# Install dependencies
|
| 14 |
RUN npm install
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
# Expose the
|
| 20 |
EXPOSE 8000
|
| 21 |
|
| 22 |
-
# Start the server
|
|
|
|
|
|
|
|
|
|
| 23 |
CMD ["node", "pokemon-showdown", "start"]
|
|
|
|
| 1 |
+
# 1. Use Node 18 (Alpine)
|
| 2 |
FROM node:18-alpine
|
| 3 |
|
| 4 |
+
# 2. Set up our working directory
|
|
|
|
|
|
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# 3. Install any system packages we may need
|
| 8 |
+
RUN apk add --no-cache git
|
| 9 |
+
|
| 10 |
+
# 4. Copy local files into the container
|
| 11 |
COPY . /app
|
| 12 |
|
| 13 |
+
# 5. Install dependencies
|
| 14 |
RUN npm install
|
| 15 |
|
| 16 |
+
# 6. Build or transpile, if Pokémon Showdown requires it
|
| 17 |
+
# If Showdown has a "build" script, run it here.
|
| 18 |
+
# In the official repo, there's a `build` script that compiles TS -> JS:
|
| 19 |
+
RUN npm run build
|
| 20 |
|
| 21 |
+
# 7. Expose the default port
|
| 22 |
EXPOSE 8000
|
| 23 |
|
| 24 |
+
# 8. Start the server
|
| 25 |
+
# If Showdown is built into "dist", you might do:
|
| 26 |
+
# CMD ["node", "dist/pokemon-showdown", "start"]
|
| 27 |
+
# Otherwise, if the original scripts remain, it might be:
|
| 28 |
CMD ["node", "pokemon-showdown", "start"]
|