From 5a55a01ecfb0d7a825ebc96e2be728b9a68ef926 Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Thu, 12 Jun 2025 07:14:07 -0700 Subject: [PATCH 1/2] Ubuntu 24 dev image Signed-off-by: Joel Winarske --- .github/workflows/ubuntu24-docker.yml | 42 ++++++++++++++ ubuntu-20-dev/Dockerfile | 6 +- ubuntu-24-dev/Dockerfile | 84 +++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ubuntu24-docker.yml create mode 100644 ubuntu-24-dev/Dockerfile diff --git a/.github/workflows/ubuntu24-docker.yml b/.github/workflows/ubuntu24-docker.yml new file mode 100644 index 0000000..001c29d --- /dev/null +++ b/.github/workflows/ubuntu24-docker.yml @@ -0,0 +1,42 @@ +name: ubuntu24-docker-build + +on: + push: + branches: + - 'main' + tags: + - 'v*' + pull_request: + branches: + - 'main' + +env: + REGISTRY_USER: ${{ github.actor }} + REGISTRY_PASSWORD: ${{ github.token }} + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + +jobs: + + ubuntu-24-dev: + runs-on: ubuntu-latest + steps: + + - name: Log in to ghcr.io + uses: redhat-actions/podman-login@v1.6 + with: + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + registry: ${{ env.IMAGE_REGISTRY }} + + - name: Checkout + uses: actions/checkout@v3 + + - uses: mr-smithers-excellent/docker-build-push@v5 + name: Build & push Docker image + with: + image: meta-flutter/ubuntu-24-dev + tags: main + registry: ghcr.io + dockerfile: ubuntu-24-dev/Dockerfile + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} diff --git a/ubuntu-20-dev/Dockerfile b/ubuntu-20-dev/Dockerfile index 4714f84..41f7d56 100644 --- a/ubuntu-20-dev/Dockerfile +++ b/ubuntu-20-dev/Dockerfile @@ -35,16 +35,16 @@ RUN pip3 install virtualenv # Desktop specific -# clang 12 +# clang 18 RUN wget https://apt.llvm.org/llvm.sh RUN chmod +x llvm.sh -RUN ./llvm.sh 12 +RUN ./llvm.sh 18 all RUN apt-get install -y libwayland-dev wayland-protocols \ mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils \ libcurl4-openssl-dev libjpeg-turbo8-dev libpng-dev libsqlite3-dev \ libssl-dev libfreetype6-dev libharfbuzz-dev libxi-dev \ - libc++-12-dev libc++abi-12-dev libunwind-dev ninja-build + libunwind-dev ninja-build # Runner user RUN adduser --disabled-password --gecos '' -u $RUNNER_USER_UID dev \ diff --git a/ubuntu-24-dev/Dockerfile b/ubuntu-24-dev/Dockerfile new file mode 100644 index 0000000..9723a1d --- /dev/null +++ b/ubuntu-24-dev/Dockerfile @@ -0,0 +1,84 @@ +FROM ubuntu:24.04 + +ARG CMAKE_VERSION=3.31.8 +ARG TZ=America/Los_Angeles +ENV DEBIAN_FRONTEND=noninteractive +ARG USER_NAME="Joel Winarske" +ARG USER_EMAIL="joel.winarske@gmail.com" +ARG RUNNER_USER_UID=1001 +ARG DOCKER_GROUP_GID=121 + +USER root + +RUN apt-get update -y +RUN apt-get install -y apt-utils + +RUN apt-get update -y +RUN apt-get upgrade -y + +RUN apt-get install -y \ + curl lsb-release software-properties-common gnupg apt-file \ + build-essential libtool chrpath cpio debianutils diffstat file \ + gawk gcc git iputils-ping libacl1 locales python3 python3-git \ + python3-jinja2 python3-pexpect python3-pip python3-subunit socat \ + texinfo unzip wget xz-utils zstd + +# Desktop specific + +# clang 18 +RUN wget https://apt.llvm.org/llvm.sh +RUN chmod +x llvm.sh +RUN ./llvm.sh 18 all + +RUN apt-get install -y libwayland-dev wayland-protocols \ + mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev \ + mesa-utils libcurl4-openssl-dev libjpeg-turbo8-dev \ + libpng-dev libsqlite3-dev libssl-dev libfreetype6-dev \ + libharfbuzz-dev libxi-dev libunwind-dev ninja-build + +# Runner user +RUN adduser --disabled-password --gecos '' -u $RUNNER_USER_UID dev \ + && groupadd docker --gid $DOCKER_GROUP_GID \ + && usermod -aG sudo dev \ + && usermod -aG docker dev \ + && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \ + && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers + +RUN chown -R dev:dev /home/dev + +RUN locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 + +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +RUN apt-get update && apt-get install -y git-lfs + +USER dev + +WORKDIR /home/dev + +RUN echo '/home/dev/.ssh/id_rsa' | ssh-keygen -t rsa -b 2048 -C "${USER_EMAIL}" +RUN git config --global user.email ${USER_EMAIL} +RUN git config --global user.name "${USER_NAME}" + +RUN set -ex \ + && for key in C6C265324BBEBDC350B513D02D2CEF1034921684; do \ + gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ + done + +# install for python 3 +RUN set -ex \ + && mkdir -p /home/dev/bin \ + && export PATH=/home/dev/bin:$PATH \ + && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo \ + && chmod a+x /home/dev/bin/repo + +RUN curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \ + && curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-SHA-256.txt.asc \ + && curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-SHA-256.txt \ + && gpg --verify cmake-${CMAKE_VERSION}-SHA-256.txt.asc cmake-${CMAKE_VERSION}-SHA-256.txt \ + && grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \ + && mkdir -p /home/dev/cmake \ + && tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /home/dev/cmake --strip-components=1 \ + && rm -rf cmake-${CMAKE_VERSION}* || true + +RUN echo 'export PATH=/home/dev/bin:/home/dev/cmake/bin:$PATH' >> /home/dev/.bashrc From e29c6a5a9428582d75439e95a911164265f34510 Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Sat, 14 Jun 2025 05:06:13 -0700 Subject: [PATCH 2/2] Ubuntu 22 dev Signed-off-by: Joel Winarske --- .github/workflows/ubuntu22-docker.yml | 42 ++++++++++++++ ubuntu-22-dev/Dockerfile | 84 +++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 .github/workflows/ubuntu22-docker.yml create mode 100644 ubuntu-22-dev/Dockerfile diff --git a/.github/workflows/ubuntu22-docker.yml b/.github/workflows/ubuntu22-docker.yml new file mode 100644 index 0000000..5b19df3 --- /dev/null +++ b/.github/workflows/ubuntu22-docker.yml @@ -0,0 +1,42 @@ +name: ubuntu22-docker-build + +on: + push: + branches: + - 'main' + tags: + - 'v*' + pull_request: + branches: + - 'main' + +env: + REGISTRY_USER: ${{ github.actor }} + REGISTRY_PASSWORD: ${{ github.token }} + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + +jobs: + + ubuntu-22-dev: + runs-on: ubuntu-latest + steps: + + - name: Log in to ghcr.io + uses: redhat-actions/podman-login@v1.6 + with: + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + registry: ${{ env.IMAGE_REGISTRY }} + + - name: Checkout + uses: actions/checkout@v3 + + - uses: mr-smithers-excellent/docker-build-push@v5 + name: Build & push Docker image + with: + image: meta-flutter/ubuntu-22-dev + tags: main + registry: ghcr.io + dockerfile: ubuntu-22-dev/Dockerfile + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} diff --git a/ubuntu-22-dev/Dockerfile b/ubuntu-22-dev/Dockerfile new file mode 100644 index 0000000..11e0512 --- /dev/null +++ b/ubuntu-22-dev/Dockerfile @@ -0,0 +1,84 @@ +FROM ubuntu:22.04 + +ARG CMAKE_VERSION=3.31.8 +ARG TZ=America/Los_Angeles +ENV DEBIAN_FRONTEND=noninteractive +ARG USER_NAME="Joel Winarske" +ARG USER_EMAIL="joel.winarske@gmail.com" +ARG RUNNER_USER_UID=1001 +ARG DOCKER_GROUP_GID=121 + +USER root + +RUN apt-get update -y +RUN apt-get install -y apt-utils + +RUN apt-get update -y +RUN apt-get upgrade -y + +RUN apt-get install -y \ + curl lsb-release software-properties-common gnupg apt-file \ + build-essential libtool chrpath cpio debianutils diffstat file \ + gawk gcc git iputils-ping libacl1 locales python3 python3-git \ + python3-jinja2 python3-pexpect python3-pip python3-subunit socat \ + texinfo unzip wget xz-utils zstd + +# Desktop specific + +# clang 18 +RUN wget https://apt.llvm.org/llvm.sh +RUN chmod +x llvm.sh +RUN ./llvm.sh 18 all + +RUN apt-get install -y libwayland-dev wayland-protocols \ + mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev \ + mesa-utils libcurl4-openssl-dev libjpeg-turbo8-dev \ + libpng-dev libsqlite3-dev libssl-dev libfreetype6-dev \ + libharfbuzz-dev libxi-dev libunwind-dev ninja-build + +# Runner user +RUN adduser --disabled-password --gecos '' -u $RUNNER_USER_UID dev \ + && groupadd docker --gid $DOCKER_GROUP_GID \ + && usermod -aG sudo dev \ + && usermod -aG docker dev \ + && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \ + && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers + +RUN chown -R dev:dev /home/dev + +RUN locale-gen en_US.UTF-8 +ENV LANG=en_US.UTF-8 + +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +RUN apt-get update && apt-get install -y git-lfs + +USER dev + +WORKDIR /home/dev + +RUN echo '/home/dev/.ssh/id_rsa' | ssh-keygen -t rsa -b 2048 -C "${USER_EMAIL}" +RUN git config --global user.email ${USER_EMAIL} +RUN git config --global user.name "${USER_NAME}" + +RUN set -ex \ + && for key in C6C265324BBEBDC350B513D02D2CEF1034921684; do \ + gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ + done + +# install for python 3 +RUN set -ex \ + && mkdir -p /home/dev/bin \ + && export PATH=/home/dev/bin:$PATH \ + && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo \ + && chmod a+x /home/dev/bin/repo + +RUN curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \ + && curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-SHA-256.txt.asc \ + && curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-SHA-256.txt \ + && gpg --verify cmake-${CMAKE_VERSION}-SHA-256.txt.asc cmake-${CMAKE_VERSION}-SHA-256.txt \ + && grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \ + && mkdir -p /home/dev/cmake \ + && tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /home/dev/cmake --strip-components=1 \ + && rm -rf cmake-${CMAKE_VERSION}* || true + +RUN echo 'export PATH=/home/dev/bin:/home/dev/cmake/bin:$PATH' >> /home/dev/.bashrc