Jofthomas HF staff commited on
Commit
d368b5c
·
verified ·
1 Parent(s): 2b29c66

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -11
Dockerfile CHANGED
@@ -1,16 +1,25 @@
1
- FROM node:18-alpine
2
-
3
- RUN adduser -D showdown
4
  WORKDIR /app
5
- RUN chown -R showdown:showdown /app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
- USER showdown
8
 
9
- # Copy code as showdown user so that showdown owns all files
10
- COPY --chown=showdown:showdown . /app
11
 
12
- RUN npm install
13
- RUN npm run build
14
 
15
- EXPOSE 8000
16
- CMD ["node", "pokemon-showdown", "start"]
 
1
+ FROM ubuntu:22.04 as base
 
 
2
  WORKDIR /app
3
+ ENV NODE_ENV=production
4
+
5
+ FROM base as build
6
+
7
+ RUN apt-get update -qq && \
8
+ apt-get install -y git curl unzip wget gnupg build-essential lsb-release
9
+
10
+ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
11
+ apt-get install -y nodejs
12
+
13
+ RUN useradd -m -u 1000 user
14
+ RUN chown -R user:user /app /usr/local /tmp
15
+ USER user
16
+ ENV HOME=/home/user \
17
+ PATH=/home/user/.local/bin:$PATH
18
 
19
+ WORKDIR $HOME/app
20
 
21
+ RUN git clone https://github.com/hsahovic/poke-env.git .
 
22
 
23
+ RUN npm install
 
24
 
25
+ CMD ["./pokemon-showdown "]