Skip to content

Commit 12064d6

Browse files
authored
Merge pull request #2 from meta-flutter/jw/ubuntu-24-dev
Ubuntu 24 dev image
2 parents 74c9682 + 1960927 commit 12064d6

File tree

3 files changed

+129
-3
lines changed

3 files changed

+129
-3
lines changed

.github/workflows/ubuntu24-docker.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ubuntu24-docker-build
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
branches:
11+
- 'main'
12+
13+
env:
14+
REGISTRY_USER: ${{ github.actor }}
15+
REGISTRY_PASSWORD: ${{ github.token }}
16+
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
17+
18+
jobs:
19+
20+
ubuntu-24-dev:
21+
runs-on: ubuntu-latest
22+
steps:
23+
24+
- name: Log in to ghcr.io
25+
uses: redhat-actions/podman-login@v1.6
26+
with:
27+
username: ${{ env.REGISTRY_USER }}
28+
password: ${{ env.REGISTRY_PASSWORD }}
29+
registry: ${{ env.IMAGE_REGISTRY }}
30+
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
34+
- uses: mr-smithers-excellent/docker-build-push@v5
35+
name: Build & push Docker image
36+
with:
37+
image: meta-flutter/ubuntu-24-dev
38+
tags: main
39+
registry: ghcr.io
40+
dockerfile: ubuntu-24-dev/Dockerfile
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}

ubuntu-20-dev/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ RUN pip3 install virtualenv
3535

3636
# Desktop specific
3737

38-
# clang 12
38+
# clang 18
3939
RUN wget https://apt.llvm.org/llvm.sh
4040
RUN chmod +x llvm.sh
41-
RUN ./llvm.sh 12
41+
RUN ./llvm.sh 18 all
4242

4343
RUN apt-get install -y libwayland-dev wayland-protocols \
4444
mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils \
4545
libcurl4-openssl-dev libjpeg-turbo8-dev libpng-dev libsqlite3-dev \
4646
libssl-dev libfreetype6-dev libharfbuzz-dev libxi-dev \
47-
libc++-12-dev libc++abi-12-dev libunwind-dev ninja-build
47+
libunwind-dev ninja-build
4848

4949
# Runner user
5050
RUN adduser --disabled-password --gecos '' -u $RUNNER_USER_UID dev \

ubuntu-24-dev/Dockerfile

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
FROM ubuntu:24.04
2+
3+
ARG CMAKE_VERSION=3.31.8
4+
ARG TZ=America/Los_Angeles
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
ARG USER_NAME="Joel Winarske"
7+
ARG USER_EMAIL="joel.winarske@gmail.com"
8+
ARG RUNNER_USER_UID=1001
9+
ARG DOCKER_GROUP_GID=121
10+
11+
USER root
12+
13+
RUN apt-get update -y
14+
RUN apt-get install -y apt-utils
15+
16+
RUN apt-get update -y
17+
RUN apt-get upgrade -y
18+
19+
RUN apt-get install -y \
20+
curl lsb-release software-properties-common gnupg apt-file \
21+
build-essential libtool chrpath cpio debianutils diffstat file \
22+
gawk gcc git iputils-ping libacl1 locales python3 python3-git \
23+
python3-jinja2 python3-pexpect python3-pip python3-subunit socat \
24+
texinfo unzip wget xz-utils zstd lz4
25+
26+
# Desktop specific
27+
28+
# clang 18
29+
RUN wget https://apt.llvm.org/llvm.sh
30+
RUN chmod +x llvm.sh
31+
RUN ./llvm.sh 18 all
32+
33+
RUN apt-get install -y libwayland-dev wayland-protocols \
34+
mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev \
35+
mesa-utils libcurl4-openssl-dev libjpeg-turbo8-dev \
36+
libpng-dev libsqlite3-dev libssl-dev libfreetype6-dev \
37+
libharfbuzz-dev libxi-dev libunwind-dev ninja-build
38+
39+
# Runner user
40+
RUN adduser --disabled-password --gecos '' -u $RUNNER_USER_UID dev \
41+
&& groupadd docker --gid $DOCKER_GROUP_GID \
42+
&& usermod -aG sudo dev \
43+
&& usermod -aG docker dev \
44+
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
45+
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers
46+
47+
RUN chown -R dev:dev /home/dev
48+
49+
RUN locale-gen en_US.UTF-8
50+
ENV LANG=en_US.UTF-8
51+
52+
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
53+
RUN apt-get update && apt-get install -y git-lfs
54+
55+
USER dev
56+
57+
WORKDIR /home/dev
58+
59+
RUN echo '/home/dev/.ssh/id_rsa' | ssh-keygen -t rsa -b 2048 -C "${USER_EMAIL}"
60+
RUN git config --global user.email ${USER_EMAIL}
61+
RUN git config --global user.name "${USER_NAME}"
62+
63+
RUN set -ex \
64+
&& for key in C6C265324BBEBDC350B513D02D2CEF1034921684; do \
65+
gpg --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
66+
done
67+
68+
# install for python 3
69+
RUN set -ex \
70+
&& mkdir -p /home/dev/bin \
71+
&& export PATH=/home/dev/bin:$PATH \
72+
&& curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo \
73+
&& chmod a+x /home/dev/bin/repo
74+
75+
RUN curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \
76+
&& curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-SHA-256.txt.asc \
77+
&& curl -fsSLO --compressed --retry 5 --retry-max-time 120 https://cmake.org/files/v3.31/cmake-${CMAKE_VERSION}-SHA-256.txt \
78+
&& gpg --verify cmake-${CMAKE_VERSION}-SHA-256.txt.asc cmake-${CMAKE_VERSION}-SHA-256.txt \
79+
&& grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \
80+
&& mkdir -p /home/dev/cmake \
81+
&& tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /home/dev/cmake --strip-components=1 \
82+
&& rm -rf cmake-${CMAKE_VERSION}* || true
83+
84+
RUN echo 'export PATH=/home/dev/bin:/home/dev/cmake/bin:$PATH' >> /home/dev/.bashrc

0 commit comments

Comments
 (0)