Skip to content

Ubuntu 22 dev #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ubuntu22-docker.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
42 changes: 42 additions & 0 deletions .github/workflows/ubuntu24-docker.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
6 changes: 3 additions & 3 deletions ubuntu-20-dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
84 changes: 84 additions & 0 deletions ubuntu-22-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]"
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
84 changes: 84 additions & 0 deletions ubuntu-24-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]"
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