diff --git a/.github/workflows/update-docker.yml b/.github/workflows/update-docker.yml index 2f0dcca36..24cce25f8 100644 --- a/.github/workflows/update-docker.yml +++ b/.github/workflows/update-docker.yml @@ -18,3 +18,7 @@ jobs: needs: Docker if: ${{ github.repository_owner == 'Armbian' }} uses: armbian/scripts/.github/workflows/build-test-image-docker.yml@master + with: + + runner: "ubuntu-latest" + reference: master diff --git a/compile.sh b/compile.sh index 3b9031c38..07d2e6453 100755 --- a/compile.sh +++ b/compile.sh @@ -238,7 +238,7 @@ if ! ls "${SRC}"/userpatches/{config-default.conf,config-docker.conf,config-vagr # Create Docker file if [[ ! -f "${SRC}"/userpatches/Dockerfile ]]; then - cp "${SRC}"/config/templates/Dockerfile "${SRC}"/userpatches/Dockerfile || exit 1 + cp "${SRC}"/config/templates/Dockerfile "${SRC}"/userpatches/Dockerfile || exit 1 fi # Create Vagrant config diff --git a/config/templates/Dockerfile b/config/templates/Dockerfile index e656cc8a8..72c88df85 100644 --- a/config/templates/Dockerfile +++ b/config/templates/Dockerfile @@ -1,4 +1,7 @@ -FROM ubuntu:21.04 +ARG BASE_IMAGE=ubuntu:jammy +FROM $BASE_IMAGE as armbian_builder +ARG ARM_GCC_COMPILER='g++-11-arm-linux-gnueabihf' +ENV ARM_GCC_COMPILER $ARM_GCC_COMPILER ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get -y install \ joe \ @@ -20,6 +23,7 @@ RUN sh -c " \ RUN apt-get update \ && apt-get -y upgrade \ && apt-get install -y --no-install-recommends \ + $ARM_GCC_COMPILER \ acl \ aptly \ aria2 \ @@ -45,7 +49,6 @@ RUN apt-get update \ f2fs-tools \ fakeroot \ flex \ - g++-8-arm-linux-gnueabihf \ gawk \ gcc-arm-linux-gnueabihf \ gcc-arm-linux-gnueabi \ @@ -67,6 +70,7 @@ RUN apt-get update \ libpython2.7-dev \ libpython3-dev \ libssl-dev \ + libssl1.1 \ libusb-1.0-0-dev \ linux-base \ locales \ diff --git a/config/templates/config-docker.conf b/config/templates/config-docker.conf index d41a5221c..2f80cd649 100644 --- a/config/templates/config-docker.conf +++ b/config/templates/config-docker.conf @@ -3,6 +3,12 @@ # This is a Docker launcher file. To set up the configuration, use command line arguments to compile.sh # or use pass a config file as a parameter ./compile docker [example] BUILD_KERNEL="yes" ... + +# Default values for Docker image +ARM_GCC_COMPILER=g++-11-arm-linux-gnueabihf +BASE_IMAGE=ubuntu:22.04 + + [[ ! -c /dev/loop-control ]] && display_alert "/dev/loop-control does not exist, image building may not work" "" "wrn" # second argument can be a build parameter or a config file @@ -18,7 +24,7 @@ else # build a new container based on provided Dockerfile display_alert "Docker container not found or out of date" display_alert "Building a Docker container" - if ! docker build -t armbian:$VERSION . ; then + if ! docker build --build-arg ARM_GCC_COMPILER=$ARM_GCC_COMPILER --build-arg BASE_IMAGE=$BASE_IMAGE -t armbian:$VERSION . ; then STATUS=$? # Adding a newline, so the alert won't be shown in the same line as the error echo diff --git a/lib/general.sh b/lib/general.sh index b0a0dbe7e..75529d4d3 100644 --- a/lib/general.sh +++ b/lib/general.sh @@ -1398,7 +1398,7 @@ prepare_host() fi # Add support for Ubuntu 20.04, 21.04 and Mint 20.x - if [[ $HOSTRELEASE =~ ^(focal|impish|hirsute|ulyana|ulyssa|bullseye|uma|una)$ ]]; then + if [[ $HOSTRELEASE =~ ^(focal|impish|hirsute|jammy|ulyana|ulyssa|bullseye|uma|una)$ ]]; then hostdeps+=" python2 python3" ln -fs /usr/bin/python2.7 /usr/bin/python2 ln -fs /usr/bin/python2.7 /usr/bin/python @@ -1413,7 +1413,7 @@ prepare_host() # # NO_HOST_RELEASE_CHECK overrides the check for a supported host system # Disable host OS check at your own risk. Any issues reported with unsupported releases will be closed without discussion - if [[ -z $HOSTRELEASE || "buster bullseye focal impish hirsute debbie tricia ulyana ulyssa uma una" != *"$HOSTRELEASE"* ]]; then + if [[ -z $HOSTRELEASE || "buster bullseye focal impish hirsute jammy debbie tricia ulyana ulyssa uma una" != *"$HOSTRELEASE"* ]]; then if [[ $NO_HOST_RELEASE_CHECK == yes ]]; then display_alert "You are running on an unsupported system" "${HOSTRELEASE:-(unknown)}" "wrn" display_alert "Do not report any errors, warnings or other issues encountered beyond this point" "" "wrn"