Skip to content

Commit

Permalink
Rename Dockerfile for mickledore and beyond
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesfernandez committed Oct 28, 2023
1 parent bc9fc8a commit 54a62d2
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 111 deletions.
7 changes: 4 additions & 3 deletions base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
119 changes: 119 additions & 0 deletions base-image/Dockerfile2
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# SPDX-FileCopyrightText: 2023, Carles Fernandez-Prades <[email protected]>
# 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="[email protected]"

# 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

106 changes: 0 additions & 106 deletions base-image/Dockerfile20

This file was deleted.

4 changes: 2 additions & 2 deletions geniux-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 54a62d2

Please sign in to comment.