Skip to content

Instantly share code, notes, and snippets.

@waiteb3
Created September 23, 2020 14:07
Show Gist options
  • Save waiteb3/3c60ae7d3d63c1f2d0836c71e0a2e330 to your computer and use it in GitHub Desktop.
Save waiteb3/3c60ae7d3d63c1f2d0836c71e0a2e330 to your computer and use it in GitHub Desktop.
Dockerfile.Godot-HTML5
FROM ubuntu:18.04 AS builder
RUN apt update && apt install -yq unzip wget
RUN wget -q https://downloads.tuxfamily.org/godotengine/3.2.3/Godot_v3.2.3-stable_linux_headless.64.zip
RUN wget -q https://downloads.tuxfamily.org/godotengine/3.2.3/Godot_v3.2.3-stable_export_templates.tpz
RUN unzip Godot_v3.2.3-stable_linux_headless.64.zip && mv /Godot_v3.2.3-stable_linux_headless.64 /bin/Godot && rm Godot_v3.2.3-stable_linux_headless.64.zip
RUN mkdir -p /root/.local/share/godot/templates/3.2.3.stable && unzip Godot_v3.2.3-stable_export_templates.tpz && \
mv templates/* /root/.local/share/godot/templates/3.2.3.stable/ && rm -r Godot_v3.2.3-stable_export_templates.tpz templates
COPY . /game
WORKDIR /game
RUN Godot --export HTML5 /www/{{GAME}} && cp /www/{{GAME}} /www/index.html
FROM nginx:latest
COPY --from=builder /www /usr/share/nginx/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment