From 54a62d23823009a29d16cc45dc9bea5bc7dbb1ce Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 28 Oct 2023 22:34:50 +0200 Subject: [PATCH] Rename Dockerfile for mickledore and beyond --- base-image/Dockerfile | 7 ++- base-image/Dockerfile2 | 119 ++++++++++++++++++++++++++++++++++++++++ base-image/Dockerfile20 | 106 ----------------------------------- geniux-builder.sh | 4 +- 4 files changed, 125 insertions(+), 111 deletions(-) create mode 100644 base-image/Dockerfile2 delete mode 100644 base-image/Dockerfile20 diff --git a/base-image/Dockerfile b/base-image/Dockerfile index 8995307..1643368 100644 --- a/base-image/Dockerfile +++ b/base-image/Dockerfile @@ -99,10 +99,11 @@ RUN add-apt-repository \ && DEBIAN_FRONTEND=noninteractive apt-get -y upgrade \ && apt-get clean && rm -rf /var/lib/apt/lists/* -# Build python 3.11, required by repo +# Build and install Python 3.11, required by repo RUN wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz \ - && tar -xf Python-3.11.*.tgz && cd Python-3.11.*/ \ - && ./configure --enable-optimizations && make && make altinstall && rm -rf * + && tar -xf Python-3.11.*.tgz && cd Python-3.11.*/ \ + && ./configure --enable-optimizations && make && make altinstall \ + && cd .. && rm Python-3.11.*.tgz && rm -rf Python-3.11.*/ # By default, Ubuntu uses dash as an alias for sh. Dash does not support the # source command needed for setting up Yocto build environments. Use bash as an diff --git a/base-image/Dockerfile2 b/base-image/Dockerfile2 new file mode 100644 index 0000000..c7de0d7 --- /dev/null +++ b/base-image/Dockerfile2 @@ -0,0 +1,119 @@ +# SPDX-FileCopyrightText: 2023, Carles Fernandez-Prades +# SPDX-License-Identifier: MIT +# +# Yocto Geniux base image to help building Geniux. + +FROM ubuntu:20.04 +LABEL version="2.1" description="Yocto Geniux base image" maintainer="carles.fernandez@cttc.es" + +# Install all Linux packages required for Yocto builds, plus other packages used +# in this file below, and in the interactive mode +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ + apt \ + apt-transport-https \ + base-files \ + bash \ + bc \ + bsdutils \ + build-essential \ + ca-certificates \ + chrpath \ + cpio \ + curl \ + debianutils \ + diffstat \ + distro-info-data \ + fdisk \ + gawk \ + gcc-multilib \ + git \ + git-lfs \ + gnupg-agent \ + gzip \ + iproute2 \ + iputils-ping \ + libbz2-dev \ + libegl1-mesa \ + libffi-dev \ + libgdbm-dev \ + liblzma5 \ + liblz4-tool \ + libpython2.7-minimal \ + libpython2.7-stdlib \ + libpython3.8 \ + libpython3.8-dev \ + libpython3.8-minimal \ + libpython3.8-stdlib \ + libreadline-dev \ + libsdl1.2-dev \ + libsqlite3-dev \ + libssl-dev \ + libtinfo5 \ + libzstd1 \ + libzstd-dev \ + linux-libc-dev \ + locales \ + login \ + mesa-common-dev \ + mount \ + nano \ + networkd-dispatcher \ + passwd \ + pkg-config \ + pwgen \ + pylint3 \ + python \ + python2.7 \ + python3 \ + python3-git \ + python3-jinja2 \ + python3-pexpect \ + python3-pip \ + python3-subunit \ + socat \ + software-properties-common \ + sudo \ + tar \ + texinfo \ + ubuntu-keyring \ + unzip \ + util-linux \ + wget \ + whois \ + xterm \ + xxd \ + xz-utils \ + zlib1g \ + zlib1g-dev \ + zstd \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install docker and upgrade packages +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - +RUN add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" && apt-get update && DEBIAN_FRONTEND=noninteractive \ + apt-get -y install docker-ce docker-ce-cli containerd.io \ + && DEBIAN_FRONTEND=noninteractive apt-get -y upgrade \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Build and install Python 3.11, required by repo +RUN wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz \ + && tar -xf Python-3.11.*.tgz && cd Python-3.11.*/ \ + && ./configure --enable-optimizations && make && make altinstall \ + && cd .. && rm Python-3.11.*.tgz && rm -rf Python-3.11.*/ + +# By default, Ubuntu uses dash as an alias for sh. Dash does not support the +# source command needed for setting up Yocto build environments. Use bash as an +# alias for sh. +RUN which dash &> /dev/null && (\ + echo "dash dash/sh boolean false" | debconf-set-selections && \ + DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash) || \ + echo "Skipping dash reconfigure (not applicable)" + +# Set the locale to en_US.UTF-8, because the Yocto build fails without any locale set. +RUN locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 + diff --git a/base-image/Dockerfile20 b/base-image/Dockerfile20 deleted file mode 100644 index cb45979..0000000 --- a/base-image/Dockerfile20 +++ /dev/null @@ -1,106 +0,0 @@ -# SPDX-FileCopyrightText: 2023, Carles Fernandez-Prades -# SPDX-License-Identifier: MIT -# -# Yocto Geniux base image to help building Geniux. - -FROM ubuntu:20.04 -LABEL version="2.0" description="Yocto Geniux base image" maintainer="carles.fernandez@cttc.es" - -# Install all Linux packages required for Yocto builds, plus other packages used -# in this file below, and in the interactive mode -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ - apt \ - apt-transport-https \ - base-files \ - bash \ - bc \ - bsdutils \ - build-essential \ - ca-certificates \ - chrpath \ - cpio \ - curl \ - debianutils \ - diffstat \ - distro-info-data \ - fdisk \ - gawk \ - gcc-multilib \ - git \ - git-lfs \ - gnupg-agent \ - gzip \ - iproute2 \ - iputils-ping \ - libegl1-mesa \ - liblzma5 \ - liblz4-tool \ - libpython2.7-minimal \ - libpython2.7-stdlib \ - libpython3.8 \ - libpython3.8-dev \ - libpython3.8-minimal \ - libpython3.8-stdlib \ - libsdl1.2-dev \ - libtinfo5 \ - libzstd1 \ - libzstd-dev \ - linux-libc-dev \ - locales \ - login \ - mesa-common-dev \ - mount \ - nano \ - networkd-dispatcher \ - passwd \ - pwgen \ - pylint3 \ - python \ - python2.7 \ - python3 \ - python3-git \ - python3-jinja2 \ - python3-pexpect \ - python3-pip \ - python3-subunit \ - socat \ - software-properties-common \ - sudo \ - tar \ - texinfo \ - ubuntu-keyring \ - unzip \ - util-linux \ - wget \ - whois \ - xterm \ - xxd \ - xz-utils \ - zlib1g \ - zlib1g-dev \ - zstd \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -# Install docker and upgrade packages -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - -RUN add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) \ - stable" && apt-get update && DEBIAN_FRONTEND=noninteractive \ - apt-get -y install docker-ce docker-ce-cli containerd.io \ - && DEBIAN_FRONTEND=noninteractive apt-get -y upgrade \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -# By default, Ubuntu uses dash as an alias for sh. Dash does not support the -# source command needed for setting up Yocto build environments. Use bash as an -# alias for sh. -RUN which dash &> /dev/null && (\ - echo "dash dash/sh boolean false" | debconf-set-selections && \ - DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash) || \ - echo "Skipping dash reconfigure (not applicable)" - -# Set the locale to en_US.UTF-8, because the Yocto build fails without any locale set. -RUN locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 - diff --git a/geniux-builder.sh b/geniux-builder.sh index 3bb21b2..68dd1e7 100755 --- a/geniux-builder.sh +++ b/geniux-builder.sh @@ -38,7 +38,7 @@ if [[ $GENIUX_VERSION == "rocko" || $GENIUX_VERSION == "sumo" || $GENIUX_VERSION then YOCTO_GENIUX_BASE_IMAGE_VERSION="1.7" else - YOCTO_GENIUX_BASE_IMAGE_VERSION="2.0" + YOCTO_GENIUX_BASE_IMAGE_VERSION="2.1" fi YOCTO_GENIUX_BASE_IMAGE="yocto-geniux-base:v$YOCTO_GENIUX_BASE_IMAGE_VERSION" @@ -146,7 +146,7 @@ if test -z "$(docker images -q $YOCTO_GENIUX_BASE_IMAGE)" then docker build --tag "$YOCTO_GENIUX_BASE_IMAGE" . else - docker build -f Dockerfile20 --tag "$YOCTO_GENIUX_BASE_IMAGE" . + docker build -f Dockerfile2 --tag "$YOCTO_GENIUX_BASE_IMAGE" . fi cd .. fi