RUN dudo -l "https://github.com/godotengine/godot/releases/download/{{ version }}-stable/Godot_v{{ version }}-stable_{{ os }}.{{ arch }}.zip" -d /tmp/godot.zip -p $GODOT_VERSION
RUN cd /tmp && unzip godot.zip && rm -f godot.zip
RUN sh -c 'find /tmp -type f -print0 -name "Godot*" | xargs --null -I{} mv {} godot'
RUN dudo -l "https://github.com/godotengine/godot/releases/download/{{ version }}-stable/Godot_v{{ version }}-stable_export_templates.tpz" -d /tmp/export_templates.zip -p $GODOT_VERSION
RUN cd /tmp && unzip export_templates.zip && rm -f export_templates.zip
RUN ls /tmp
RUN mkdir -p /out/templates
RUN sh -c 'cd /tmp && find . -type f -print0 -name "Godot*" | xargs --null -I{} mv {} /out/{}'
RUN chmod +x /out/godot
FROM ubuntu as builder
RUN apt-get update -y && apt-get install fontconfig -y