forked from henriquelalves/SnakeVersusWebRTC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (35 loc) · 1.72 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
46
47
FROM ubuntu:xenial
USER root
WORKDIR '/app'
ARG GODOT_VERSION=3.4.2
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
wget \
unzip \
python \
python-openssl \
curl \
gnupg \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \
&& wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_export_templates.tpz \
&& mkdir ~/.cache \
&& mkdir -p ~/.config/godot \
&& mkdir -p ~/.local/share/godot/templates/${GODOT_VERSION}.stable \
&& unzip Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \
&& mv Godot_v${GODOT_VERSION}-stable_linux_headless.64 /usr/local/bin/godot \
&& unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz \
&& mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.stable \
&& rm -f Godot_v${GODOT_VERSION}-stable_export_templates.tpz Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip
RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \
&& unzip Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \
&& mv Godot_v${GODOT_VERSION}-stable_linux_headless.64 /usr/local/bin/godot \
&& rm Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip
COPY ./web/ ./web/
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get -y install nodejs
RUN cd /app/web && npm install
COPY ./godot-project/ ./godot-project/
RUN cd /app/godot-project && godot --export "Client" ../web/game/game && mv ../web/game/game ../web/game/index.html
EXPOSE 8080
CMD cd /app/web && npm start