From 8702f997ed268182be3d0b4c5f5a184a4a0c6f3f Mon Sep 17 00:00:00 2001 From: Vitalii Chyrka Date: Wed, 31 Jul 2024 10:55:19 +0300 Subject: [PATCH 1/4] updated ubuntu, git-lfs, busybox --- .idea/.gitignore | 5 +++++ .idea/cf-git-cloner.iml | 12 ++++++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ Dockerfile | 25 ++++++++----------------- service.yaml | 2 +- 6 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/cf-git-cloner.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/cf-git-cloner.iml b/.idea/cf-git-cloner.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/cf-git-cloner.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..8c98329 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d9c9c5e..1b0e779 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,26 @@ #moving to ubuntu instead of debian to solve high vulnerabilities -FROM ubuntu:jammy-20240212 +FROM ubuntu:noble-20240605 RUN apt-get update && \ apt-get install -y curl bash openssl git && \ apt-get clean -# git-lfs v3.4.0 - last available at the 23.10.2023 and it contains bug. Don't update to the version 3.4.0 !!! -# https://codefresh-io.atlassian.net/browse/CR-20633 -# Next preferred version must be >=3.4.1 and should be tested -RUN apt-get install git-lfs=3.0.2-1 && \ - git lfs install +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ + apt-get install git-lfs=3.5.1 && \ + git lfs install #installing busybox -ARG BUSYBOX_VERSION=1.31.0 +ARG BUSYBOX_VERSION=1:1.36.1-6ubuntu3 -RUN curl -sL https://busybox.net/downloads/binaries/${BUSYBOX_VERSION}-defconfig-multiarch-musl/busybox-x86_64 -o busybox && \ - ls -l busybox && \ - chmod +x busybox && \ - mv busybox /usr/bin/ && \ - ls /usr/bin/busybox && \ - busybox | head -n 1 - - -RUN ln -s /bin/busybox /usr/bin/[[ +RUN apt-get install busybox=${BUSYBOX_VERSION} && \ + ln -s /bin/busybox /usr/bin/[[ COPY ./start.sh /run/start.sh RUN chmod +x /run/start.sh # USER nodeuser RUN addgroup --gid 3000 nodegroup \ - && adduser --uid 3000 --home /home/nodeuser --ingroup nodegroup --shell /bin/sh --gecos "" --disabled-password nodeuser + && adduser --uid 3000 --home /home/nodeuser --ingroup nodegroup --shell /bin/sh --gecos "" --disabled-password nodeuser USER nodeuser CMD ["/run/start.sh"] diff --git a/service.yaml b/service.yaml index 155a381..65c948d 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -version: 10.1.27 +version: 10.1.28 From a397cc72023dcfdb84aaf122b46fd2744d1698f5 Mon Sep 17 00:00:00 2001 From: Vitalii Chyrka Date: Wed, 31 Jul 2024 11:03:06 +0300 Subject: [PATCH 2/4] added gitignore --- .gitignore | 1 + .idea/.gitignore | 5 ----- .idea/cf-git-cloner.iml | 12 ------------ .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ 5 files changed, 1 insertion(+), 31 deletions(-) create mode 100644 .gitignore delete mode 100644 .idea/.gitignore delete mode 100644 .idea/cf-git-cloner.iml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index b58b603..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/cf-git-cloner.iml b/.idea/cf-git-cloner.iml deleted file mode 100644 index 24643cc..0000000 --- a/.idea/cf-git-cloner.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 8c98329..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From e8d781c6b53b2b6c933b8bf49024e15eafd1f9af Mon Sep 17 00:00:00 2001 From: vitaliichyrka Date: Thu, 1 Aug 2024 17:23:24 +0300 Subject: [PATCH 3/4] git-lfs with bug --- Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1b0e779..576dc50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,24 @@ #moving to ubuntu instead of debian to solve high vulnerabilities -FROM ubuntu:noble-20240605 +FROM ubuntu:noble-20240114 RUN apt-get update && \ apt-get install -y curl bash openssl git && \ apt-get clean -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ - apt-get install git-lfs=3.5.1 && \ +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +RUN apt list git-lfs -a && \ + apt-get install git-lfs=3.4.1-1 && \ git lfs install #installing busybox -ARG BUSYBOX_VERSION=1:1.36.1-6ubuntu3 +ARG BUSYBOX_VERSION=1.31.0 -RUN apt-get install busybox=${BUSYBOX_VERSION} && \ - ln -s /bin/busybox /usr/bin/[[ +RUN curl -sL https://busybox.net/downloads/binaries/${BUSYBOX_VERSION}-defconfig-multiarch-musl/busybox-x86_64 -o busybox && \ + ls -l busybox && \ + chmod +x busybox && \ + mv busybox /usr/bin/ && \ + ls /usr/bin/busybox && \ + busybox | head -n 1 COPY ./start.sh /run/start.sh RUN chmod +x /run/start.sh From 04438cf6edbdf0c9eb288d1da0276cc519f1b6ff Mon Sep 17 00:00:00 2001 From: vitaliichyrka Date: Thu, 1 Aug 2024 17:59:22 +0300 Subject: [PATCH 4/4] git-lfs with bug --- Dockerfile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 576dc50..c1888b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,23 @@ #moving to ubuntu instead of debian to solve high vulnerabilities -FROM ubuntu:noble-20240114 +FROM ubuntu:jammy-20230816 RUN apt-get update && \ apt-get install -y curl bash openssl git && \ apt-get clean -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash -RUN apt list git-lfs -a && \ - apt-get install git-lfs=3.4.1-1 && \ - git lfs install +ARG GIT_LFS_VERSION=3.4.0 +ARG TARGETPLATFORM +# installing git-lfs +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") OS_ARCH=amd64 ;; \ + "linux/arm64") OS_ARCH=arm64 ;; \ + esac \ + && curl -sL https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${OS_ARCH}-v${GIT_LFS_VERSION}.tar.gz -o "git-lfs.tar.gz" && \ + tar -xvzf "git-lfs.tar.gz" && \ + chmod +x git-lfs-${GIT_LFS_VERSION}/install.sh && \ + rm git-lfs.tar.gz && \ + git-lfs-${GIT_LFS_VERSION}/install.sh #installing busybox ARG BUSYBOX_VERSION=1.31.0