Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +10 -12
Dockerfile
CHANGED
|
@@ -1,22 +1,20 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
-
# Node Ver.18 Alpine
|
| 4 |
FROM node:18-alpine
|
| 5 |
|
| 6 |
-
# Default
|
| 7 |
EXPOSE 8000
|
| 8 |
|
| 9 |
-
#
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
# Install Git
|
| 13 |
RUN apk add --no-cache git
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
RUN
|
| 17 |
-
|
| 18 |
-
# Set the remote repository to the showdown repository
|
| 19 |
-
RUN ["git", "remote", "add", "origin", "https://www.github.com/smogon/pokemon-showdown.git"]
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Start from Node.js 18 Alpine
|
|
|
|
|
|
|
| 2 |
FROM node:18-alpine
|
| 3 |
|
| 4 |
+
# Default port for Pokemon Showdown
|
| 5 |
EXPOSE 8000
|
| 6 |
|
| 7 |
+
# Set up working directory
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
# Install Git
|
| 11 |
RUN apk add --no-cache git
|
| 12 |
|
| 13 |
+
# Initialize git repository and set remote
|
| 14 |
+
RUN git init .
|
| 15 |
+
RUN git remote add origin https://www.github.com/smogon/pokemon-showdown.git
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
# Use a shell entrypoint to chain multiple commands:
|
| 18 |
+
# 1) Pull latest code
|
| 19 |
+
# 2) Launch showdown server
|
| 20 |
+
ENTRYPOINT ["/bin/sh", "-c", "git pull origin master && node pokemon-showdown start"]
|