Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
@@ -1,20 +1,21 @@
|
|
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"]
|
|
|
1 |
# Start from Node.js 18 Alpine
|
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 |
+
# Mark /app as a safe directory for Git
|
11 |
+
RUN git config --global --add safe.directory /app
|
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 |
+
# Expose Pokemon Showdown default port
|
18 |
+
EXPOSE 8000
|
19 |
+
|
20 |
# Use a shell entrypoint to chain multiple commands:
|
|
|
|
|
21 |
ENTRYPOINT ["/bin/sh", "-c", "git pull origin master && node pokemon-showdown start"]
|