Jofthomas HF staff commited on
Commit
ebd7f64
·
verified ·
1 Parent(s): 2f25135

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -12
Dockerfile CHANGED
@@ -1,21 +1,23 @@
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"]
 
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"]