Skip to content

Commit

Permalink
refs #147: wip on the dockerfile for reference generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
stickgrinder committed Feb 15, 2024
1 parent 4d2f788 commit 84a1604
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
37 changes: 25 additions & 12 deletions Dockerfile.DocsMaker
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
FROM python:3.13-rc-alpine

RUN apk add --no-cache libatomic \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk \
&& apk add --allow-untrusted --force-overwrite glibc-2.31-r0.apk \
&& rm -f glibc-2.31-r0.apk \
# Install Godot 4.1.x (pinned version - see )
&& wget https://github.com/godotengine/godot-builds/releases/download/4.1.3-stable/Godot_v4.1.3-stable_linux.x86_64.zip \
&& unzip Godot_v4.1.3-stable_linux.x86_64.zip \
&& mv Godot_v4.1.3-stable_linux.x86_64 /usr/local/bin/godot \
&& chmod +x /usr/local/bin/godot \
&& rm -f Godot_v4.1.3-stable_linux.x86_64.zip \
&& godot -v -e --quit --headless \
ARG GODOT_VERSION="4.1.3"
ARG RELEASE_NAME="stable"
ARG SUBDIR=""
ARG GODOT_PLATFORM="linux.x86_64"

# Override user name at build. If build-arg is not passed, will create user named `host_user`
ARG DOCKER_USER=host_user
ARG DOCKER_USER_UID=1000
ARG DOCKER_USER_GID=1000

# Create a group and user
RUN addgroup -g ${DOCKER_USER_GID} -S ${DOCKER_USER} && adduser -u ${DOCKER_USER_UID} -S ${DOCKER_USER} -G ${DOCKER_USER}

RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing godot=4.1.3-r0 \
&& mkdir /home/${DOCKER_USER}/.cache \
&& mkdir -p /home/${DOCKER_USER}/.config/godot \
&& mkdir -p /home/${DOCKER_USER}/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \
# && wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
# && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
# && mv templates/* /home/${DOCKER_USER}/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \
# && rm -f Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
&& chown -R ${DOCKER_USER}:${DOCKER_USER} /home/${DOCKER_USER} \
# Ensure Python dependencies
&& pip3 install --no-cache --upgrade pip setuptools \
# && pip3 install --no-cache --upgrade pip setuptools \
# Download gdscript-docs-maker repo
&& wget https://github.com/GDQuest/gdscript-docs-maker/archive/refs/tags/v1.7.0.zip \
&& unzip v1.7.0.zip \
Expand All @@ -24,5 +35,7 @@ WORKDIR /app
# Install application dependencies
RUN python3 setup.py install

COPY generate_reference /app/generate_reference

# Run dockmaker script
ENTRYPOINT ["./generate_reference"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ api-docs:
-v .:/project \
-v ./docs/content/the-engine-handbook/scripting-reference:/output \
-u $(CURRENT_UID) \
gdquest/gdscript-docs-maker:master /project \
popochiu-docs-maker:gdm-1.7.0 /project \
-o /output \
-d addons/popochiu/engine/

Expand Down

0 comments on commit 84a1604

Please sign in to comment.