From e78a6fbb200aa6ff0a6f6f196c73f44708354279 Mon Sep 17 00:00:00 2001 From: Vladimir Hodakov Date: Sun, 25 May 2025 17:51:22 +0400 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ .woodpecker/docker.yaml | 35 +++++++++++++++++++++++++++++++++++ Dockerfile | 33 +++++++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 3 +++ 5 files changed, 95 insertions(+) create mode 100644 .gitignore create mode 100644 .woodpecker/docker.yaml create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2669663 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.env +.idea +.vscode diff --git a/.woodpecker/docker.yaml b/.woodpecker/docker.yaml new file mode 100644 index 0000000..09eda1b --- /dev/null +++ b/.woodpecker/docker.yaml @@ -0,0 +1,35 @@ + +when: + branch: main + event: [push, pull_request, tag] + +variables: + - &repo source.hodakov.me/${CI_REPO_OWNER}/renkit + +steps: + dryrun: + image: woodpeckerci/plugin-docker-buildx:5.1.0 + privileged: true + settings: + dockerfile: Dockerfile + platforms: linux/arm64/v8,linux/amd64 + dry_run: true + repo: *repo + auto_tag: true + when: + event: pull_request + + publish: + image: woodpeckerci/plugin-docker-buildx:5.1.0 + privileged: true + settings: + dockerfile: Dockerfile + platforms: linux/arm64/v8,linux/amd64 + repo: *repo + registry: source.hodakov.me + auto_tag: true + username: ${CI_REPO_OWNER} + password: + from_secret: registry_token + when: + event: [push, tag] diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c298b63 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +# build for a specific version of Ren'Py with: +# docker build . --tag renpy:8.2.0 --build-arg renpy_version=8.2.0 +# to run commands: +# docker run --rm -it --volume /local/project/path:/project renpy:8.2.0 renutil launch 8.2.0 -d -- "/project compile" + +# this Dockerfile copied from https://github.com/kobaltcore/renkit/blob/master/Dockerfile + +FROM ubuntu:22.04 +ARG renpy_version=8.3.7 +ARG renkit_version=latest + +ENV DEBIAN_FRONTEND=noninteractive + +# install java +ENV JAVA_HOME=/opt/java/openjdk +COPY --from=eclipse-temurin:21-jdk $JAVA_HOME $JAVA_HOME +ENV PATH="${JAVA_HOME}/bin:${PATH}" + +# install dependencies +RUN apt-get update && \ + apt-get install -y curl wget xz-utils libgl1 && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +ENV PATH="/root/.cargo/bin:${PATH}" + +# install renkit +RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/kobaltcore/renkit/releases/$(if [ "$renkit_version" = "latest" ]; then echo "latest/download"; else echo "download/v$renkit_version"; fi)/renkit-installer.sh | sh + +# install the specified version of Ren'Py +RUN $HOME/.cargo/bin/renutil install $renpy_version + +# default entrypoint so people can dispatch to any of renkit's tools +CMD [ "/bin/bash", "-c"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ad8a620 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Vladimir "hdkv" Hodakov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c6a3c77 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# docker-renkit: Renkit with Ren'Py installed inside a Docker container + +This container builds [Renkit](https://github.com/kobaltcore/renkit) and installs Ren'Py version, defined in Dockerfile, inside it.