From e07b89e680684e0eff89a86412e6204f54e7550b Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Fri, 19 May 2023 17:03:07 +0100 Subject: [PATCH 1/7] Build from 9fans/plan9port --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..ad7db280d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM alpine:3.18 + +RUN apk add \ + build-base \ + expat \ + git-perl \ + libssl3 \ + libretls \ + linux-headers \ + make + +ENV PLAN9=/usr/local/plan9 + +WORKDIR $PLAN9 +RUN git clone --depth=1 https://github.com/9fans/plan9port.git . +RUN ./INSTALL + +ENV PATH=$PATH:$PLAN9/bin From 9a4dba3acc29160d192c4aa7bd5d1879e32ef861 Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Fri, 19 May 2023 17:04:55 +0100 Subject: [PATCH 2/7] Create .gitattributes Stops git changing line endings to CRLF on Windows, which messes up building docker images that directly copy scripts from Windows folders. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..176a458f9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto From ff4c4edae4522e17a8d31ff46024360be8185d9d Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Fri, 19 May 2023 17:12:38 +0100 Subject: [PATCH 3/7] Update .gitattributes Actually turned off the line ending alteration --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 176a458f9..fe505b275 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -* text=auto +* text=false From 8fb2afacc9966f1a79cb0deaa1c3b6275cb24e0a Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Fri, 19 May 2023 17:24:02 +0100 Subject: [PATCH 4/7] Fixed incorrect advice from stackoverflow Should've read the docs... : https://git-scm.com/docs/gitattributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index fe505b275..fcadb2cf9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -* text=false +* text eol=lf From 4983234ee05a8a47b152286963e0c0674ce39176 Mon Sep 17 00:00:00 2001 From: James Parrott <80779630+JamesParrott@users.noreply.github.com> Date: Fri, 19 May 2023 17:32:13 +0100 Subject: [PATCH 5/7] Build from local Windows folder finally! :) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ad7db280d..97c71ce18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add \ ENV PLAN9=/usr/local/plan9 WORKDIR $PLAN9 -RUN git clone --depth=1 https://github.com/9fans/plan9port.git . +COPY . . RUN ./INSTALL ENV PATH=$PATH:$PLAN9/bin From a0a3df4e641308a20f5ac47539557d0ed3f56198 Mon Sep 17 00:00:00 2001 From: James Parrott <80779630+JamesParrott@users.noreply.github.com> Date: Fri, 19 May 2023 18:04:10 +0100 Subject: [PATCH 6/7] Eliminate unnecessary packages. Add perl. --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97c71ce18..2a533911e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,9 @@ FROM alpine:3.18 RUN apk add \ build-base \ expat \ - git-perl \ - libssl3 \ - libretls \ linux-headers \ - make + make \ + perl ENV PLAN9=/usr/local/plan9 From 8e83a7104efea47f874ad50270b057211c559b7c Mon Sep 17 00:00:00 2001 From: James Parrott <80779630+JamesParrott@users.noreply.github.com> Date: Fri, 19 May 2023 19:04:52 +0100 Subject: [PATCH 7/7] Removed make and expat. Switch from build-base to gcc and libc-dev --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a533911e..28e68ef56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ FROM alpine:3.18 +RUN apk update --no-cache + RUN apk add \ - build-base \ - expat \ + gcc \ + libc-dev \ linux-headers \ - make \ perl ENV PLAN9=/usr/local/plan9