forked from shamansir/tron-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (30 loc) · 1.29 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM node:8
ARG EXAMPLE=Everything
RUN mkdir /app
WORKDIR /app
COPY . /app
RUN rm -Rf ./node_modules
RUN npm install
RUN npm install elm
RUN npm install typescript
RUN chmod +x ./node_modules/typescript/bin/tsc
RUN chmod +x ./node_modules/elm/bin/elm
RUN chmod -f +rx ./elm-stuff/0.19.1/d.dat || true
# RUN cd ./example
RUN node_modules/typescript/bin/tsc ./Tron.ts
RUN cd ./example && ../node_modules/elm/bin/elm make ./$EXAMPLE/Main.elm --output=./app.js
FROM nginx:1.15
ARG EXAMPLE=Everything
COPY --from=0 /app/Tron.js /usr/share/nginx/html
COPY --from=0 /app/example/app.js /usr/share/nginx/html
COPY --from=0 /app/example/dat.gui.min.js /usr/share/nginx/html
COPY --from=0 /app/src/Tron.css /usr/share/nginx/html
COPY --from=0 /app/example/dat-gui-proxy.js /usr/share/nginx/html
COPY --from=0 /app/example/ws-client.js /usr/share/nginx/html
COPY --from=0 /app/example/$EXAMPLE/index.html /usr/share/nginx/html
COPY --from=0 /app/example/Example/Goose/JetBrainsMono-Regular.woff /usr/share/nginx/html
COPY --from=0 /app/example/Example/Goose/JetBrainsMono-Regular.woff2 /usr/share/nginx/html
COPY --from=0 /app/example/example.css /usr/share/nginx/html
RUN mkdir /usr/share/nginx/html/assets
COPY --from=0 /app/example/assets/ /usr/share/nginx/html/assets/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf