From 376f6f65a5f17e2b2cb1df34c823c257f931fc61 Mon Sep 17 00:00:00 2001 From: Yvan Janssens Date: Wed, 22 Mar 2023 09:20:48 +0000 Subject: [PATCH] Add hercules-helper install to vscode image. --- Dockerfile | 11 +++++++++++ add-herc-helper-to-init.patch | 5 +++++ allow-root-build.patch | 27 +++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 Dockerfile create mode 100644 add-herc-helper-to-init.patch create mode 100644 allow-root-build.patch diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3d1c631 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM ghcr.io/linuxserver/code-server:latest + +RUN apt update -y && apt upgrade -y && apt install -y build-essential cmake python3-dev c3270 + +RUN cd / && git clone https://github.com/wrljet/hercules-helper.git +COPY allow-root-build.patch /hercules-helper +RUN cd /hercules-helper && patch hyperion-buildall.sh allow-root-build.patch && ./hyperion-buildall.sh + +COPY add-herc-helper-to-init.patch /hercules-helper +RUN cd / && patch init /hercules-helper/add-herc-helper-to-init.patch + diff --git a/add-herc-helper-to-init.patch b/add-herc-helper-to-init.patch new file mode 100644 index 0000000..838ab06 --- /dev/null +++ b/add-herc-helper-to-init.patch @@ -0,0 +1,5 @@ +29a30,33 +> +> #add HerculesHelper init script: +> . /hercules-helper/herc4x/hyperion-init-bash.sh +> diff --git a/allow-root-build.patch b/allow-root-build.patch new file mode 100644 index 0000000..92669d3 --- /dev/null +++ b/allow-root-build.patch @@ -0,0 +1,27 @@ +diff --git a/hyperion-buildall.sh b/hyperion-buildall.sh +index 47d7d25..97e56b1 100755 +--- a/hyperion-buildall.sh ++++ b/hyperion-buildall.sh +@@ -788,21 +788,8 @@ LDFLAGS=${LDFLAGS:-""} + + #----------------------------------------------------------------------------- + +-if [ "$EUID" -eq 0 ]; then +- echo # print a new line +- echo "Running this as root is dangerous and can cause misconfiguration issues" +- echo "or damage to your system. Run as a normal user, and the parts that need" +- echo "it will ask for your sudo password (if required)." +- echo # print a new line +- echo "For information, see:" +- echo "https://askubuntu.com/questions/16178/why-is-it-bad-to-log-in-as-root" +- echo "https://wiki.debian.org/sudo/" +- echo "https://phoenixnap.com/kb/how-to-create-add-sudo-user-centos" +- echo # print a new line +- read -p "Hit return to exit" -n 1 -r +- echo # print a new line +- exit 1 +-fi ++# Patched out running-as-root check to allow building Docker container. ++# + + #-----------------------------------------------------------------------------