Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +18 -10
Dockerfile
CHANGED
|
@@ -1,17 +1,25 @@
|
|
| 1 |
-
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
RUN
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
RUN
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
CMD ["
|
|
|
|
| 1 |
+
# Starting Image
|
| 2 |
|
| 3 |
+
# Node Ver.18 Alpine
|
| 4 |
+
FROM node:18-alpine
|
| 5 |
+
|
| 6 |
+
# Default PS! Server Port
|
| 7 |
+
EXPOSE 8000
|
| 8 |
+
|
| 9 |
+
# Container Entrypoint
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
+
# Install Git Package
|
| 13 |
+
RUN ["apk", "add", "git"]
|
| 14 |
|
| 15 |
+
# Create a git repository
|
| 16 |
+
RUN ["git", "init", "."]
|
| 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 |
+
# (Entry Point) Update the server repository and start the server
|
| 22 |
+
ENTRYPOINT ["git" "pull" "origin" "master" "&&" "node", "pokemon-showdown"]
|
| 23 |
|
| 24 |
+
# Specify the -c switch on exec
|
| 25 |
+
CMD ["-c"]
|