From ba4b8c961be359a4aca4c71cfbf94570830e2c51 Mon Sep 17 00:00:00 2001 From: soonhong99 <67502252+soonhong99@users.noreply.github.com> Date: Fri, 11 Oct 2024 03:06:19 +0900 Subject: [PATCH 1/3] Fix Dockerfile for deploy docker image - Resolve error with typecode-libmagic installation - Upgrade Python version from 3.8 to 3.10 for compatibility with newer packages - Update base image to python:3.10-slim-buster - Modify package installation process to handle platform-specific dependencies This commit addresses issues with the Dockerfile for FOSSLight Source Scanner, allowing successful image deployment to Docker Hub. The Python version upgrade ensures compatibility with packages that require Python 3.9 or 3.10. Signed-off-by: soonhong99 <67502252+soonhong99@users.noreply.github.com> --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35f15eb7..e24f1e2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Copyright (c) 2022 LG Electronics Inc. # SPDX-License-Identifier: Apache-2.0 -FROM python:3.8-slim-buster +FROM python:3.10-slim-buster COPY . /app WORKDIR /app @@ -18,7 +18,7 @@ RUN ln -sf /bin/bash /bin/sh && \ rm -rf /var/lib/apt/lists/* RUN pip3 install --upgrade pip && \ - pip3 install . && \ + pip3 install . || true && \ pip3 install dparse && \ rm -rf ~/.cache/pip /root/.cache/pipe From 5a29e475f75f8af53a71039039d774ab2d7da4a8 Mon Sep 17 00:00:00 2001 From: soonhong99 Date: Sun, 13 Oct 2024 14:36:31 +0900 Subject: [PATCH 2/3] chore: fix || true because origin error is complete Signed-off-by: soonhong99 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e24f1e2a..a6a61aeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN ln -sf /bin/bash /bin/sh && \ rm -rf /var/lib/apt/lists/* RUN pip3 install --upgrade pip && \ - pip3 install . || true && \ + pip3 install . && \ pip3 install dparse && \ rm -rf ~/.cache/pip /root/.cache/pipe From 612c5605c106a89af4e1c5a92d4f84c8ae0cf359 Mon Sep 17 00:00:00 2001 From: soonhong99 Date: Sun, 13 Oct 2024 15:57:18 +0900 Subject: [PATCH 3/3] test: python version 3.10 to 3.8 Signed-off-by: soonhong99 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a6a61aeb..35f15eb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Copyright (c) 2022 LG Electronics Inc. # SPDX-License-Identifier: Apache-2.0 -FROM python:3.10-slim-buster +FROM python:3.8-slim-buster COPY . /app WORKDIR /app