Jofthomas commited on
Commit
21e5fe9
·
verified ·
1 Parent(s): 3911b56

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -18
Dockerfile CHANGED
@@ -1,32 +1,17 @@
1
  FROM node:18
2
 
3
- # Create working directory
4
  WORKDIR /app
5
 
6
- # Clone Showdown
7
- RUN git clone https://github.com/smogon/pokemon-showdown.git .
8
 
9
- # Switch to the Showdown folder
10
  WORKDIR /app/pokemon-showdown
11
 
12
- # Give write permissions to the entire folder (quick fix)
13
  RUN chmod -R 777 /app/pokemon-showdown
14
 
15
- # Or, more correct: chown everything to node
16
- # RUN chown -R node:node /app/pokemon-showdown
17
-
18
- # Install dependencies
19
  RUN npm install
20
-
21
- # Copy default config
22
  RUN cp config/config-example.js config/config.js
23
 
24
- # Expose a port
25
  EXPOSE 8000
26
-
27
- # Use root or node user
28
- # If you prefer the node user for security, do:
29
- # USER node
30
-
31
- # Finally, start server
32
  CMD ["node", "pokemon-showdown", "8000"]
 
1
  FROM node:18
2
 
 
3
  WORKDIR /app
4
 
5
+ # Clone into the subfolder explicitly
6
+ RUN git clone https://github.com/smogon/pokemon-showdown.git /app/pokemon-showdown
7
 
 
8
  WORKDIR /app/pokemon-showdown
9
 
10
+ # Optional: fix permissions so Showdown can write to dist/
11
  RUN chmod -R 777 /app/pokemon-showdown
12
 
 
 
 
 
13
  RUN npm install
 
 
14
  RUN cp config/config-example.js config/config.js
15
 
 
16
  EXPOSE 8000
 
 
 
 
 
 
17
  CMD ["node", "pokemon-showdown", "8000"]