Skip to content

Commit 419828e

Browse files
committed
Update and refactor Dockerfiles to newer Ubuntu
The docker images all have new, simpler names and use Ubuntu 20.04 (instead of 18.04) as their base. A few new tools have been added, specifically what is needed for: - Linux on RISC-V - see #980 - Winodows on ARM - see #969 Fixes #976
1 parent c77f266 commit 419828e

File tree

60 files changed

+199
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+199
-344
lines changed

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Dockerfile text
4848
*.yaml text
4949
*.yml text
5050
.dockerignore text
51-
uid_entrypoint text
5251

5352
# Qt
5453
*.pro text

.github/workflows/code-cleanliness.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Run Check Code Cleanliness with Docker
1414
uses: addnab/docker-run-action@v3
1515
with:
16-
image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519
16+
image: quay.io/eclipse-cdt/cdt-infra-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519
1717
options: -v ${{ github.workspace }}:/work
1818
run: |
1919
set -x

BUILDING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To build CDT plug-ins you need a standard Maven & Java development environment.
2525
The CI build automatically run code cleanliness checks. To run them on your computer it is recommended to use the Docker image, for example like this from the root of the checked out CDT repo:
2626

2727
```sh
28-
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install:latest releng/scripts/check_code_cleanliness.sh
28+
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra:latest releng/scripts/check_code_cleanliness.sh
2929
```
3030

3131
### Profiles
@@ -160,7 +160,7 @@ An additional tip is to set the following in `.gitconfig` to allow you to diff `
160160

161161
When the host is Windows, getting docker to behave as encoded in the pom.xml may be challenging, instead a command like this will probably work (replace your path to git root). Note that running this in git bash causes problems because of the /work in the command line arguments. (TODO integrate this command line way of running into the pom.xml so the original instructions work.)
162162

163-
`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest' 'make' '-C' 'native_src' 'rebuild'`
163+
`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra:latest' 'make' '-C' 'native_src' 'rebuild'`
164164

165165
See also `jniheaders` profile above.
166166

NewAndNoteworthy/CDT-12.0.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ This is the New & Noteworthy page for CDT 12.0 which is part of Eclipse 2025-03
66

77
# Release Notes
88

9+
## Minimum version of GLIBC required
10+
11+
The minimum version of GLIBC required is now 2.31.
12+
This version can be found in Ubuntu 20.04 and later, RHEL 9.0 and later and other distros as well.
13+
CDT's native components will likely work with older versions of glibc too, assuming they provide the required APIs for Eclipse CDT.
14+
915
# Managed Build
1016

1117
## Other objects for GNU archive files
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

core/org.eclipse.cdt.core.native/native_src/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ OS_DIR_LINUX_PPC64LE := ../../org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64l
2828
OS_DIR_MACOS_X86_64 := ../../org.eclipse.cdt.core.macosx/os/macosx/x86_64
2929
OS_DIR_MACOS_AARCH64 := ../../org.eclipse.cdt.core.macosx/os/macosx/aarch64
3030

31-
COMMON_CFLAGS := -Wall -pedantic -Werror
31+
COMMON_CFLAGS := -Wall -pedantic -Werror -std=gnu11
32+
COMMON_CCFLAGS := -Wall -pedantic -Werror -std=gnu++14
3233

3334
UNAME = $(shell uname)
3435
ifeq ($(UNAME),Linux)
@@ -55,7 +56,8 @@ LIBS = \
5556
$(OS_DIR_MACOS_AARCH64)/libpty.jnilib
5657
else
5758
ifeq ($(findstring ARM64,$(UNAME)),ARM64)
58-
COMMON_CFLAGS := -Wall -pedantic
59+
COMMON_CFLAGS := -Wall -pedantic -std=gnu11
60+
COMMON_CCFLAGS := -Wall -pedantic -std=gnu++14
5961
LIBS = \
6062
$(OS_DIR_WIN32_AARCH64)/starter.exe \
6163
$(OS_DIR_WIN32_AARCH64)/spawner.dll
@@ -128,7 +130,7 @@ $(OS_DIR_WIN32_X86_64)/spawner.dll: win/iostream.c win/raise.c win/spawner.c win
128130
$(OS_DIR_WIN32_X86_64)/pty.dll: win/pty.cpp win/pty_dllmain.cpp win/util.c
129131
mkdir -p $(dir $@) && \
130132
$(REPRODUCIBLE_BUILD_WRAPPER) \
131-
x86_64-w64-mingw32-g++ $(COMMON_CFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \
133+
x86_64-w64-mingw32-g++ $(COMMON_CCFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \
132134
-DUNICODE \
133135
$^ \
134136
-Wl,--kill-at --shared -L$(OS_DIR_WIN32_X86_64) -lwinpty -static-libstdc++ -static-libgcc

core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) {
8585
}
8686
}
8787

88-
static void close_all_fds() {
88+
static void close_all_fds(void) {
8989
unsigned int from_fd = STDERR_FILENO + 1;
9090
if (sys_close_range_wrapper(from_fd) == 0)
9191
return;

core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) {
8484
}
8585
}
8686

87-
static void close_all_fds() {
87+
static void close_all_fds(void) {
8888
unsigned int from_fd = STDERR_FILENO + 1;
8989
if (sys_close_range_wrapper(from_fd) == 0) {
9090
return;

core/org.eclipse.cdt.core.native/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@
7979
<configuration>
8080
<target>
8181
<exec executable="docker" newenvironment="false" failOnError="true">
82-
<!-- docker run -\-rm -t -v $(git rev-parse -\-show-toplevel):/work -w /work/$(git rev-parse -\-show-prefix) quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest make -C native_src rebuild -->
82+
<!-- docker run -\-rm -t -v $(git rev-parse -\-show-toplevel):/work -w /work/$(git rev-parse -\-show-prefix) quay.io/eclipse-cdt/cdt-infra:latest make -C native_src rebuild -->
8383
<arg value="run" />
8484
<arg value="--rm" />
8585
<arg value="-t" />
8686
<arg value="-v" />
8787
<arg value="${project.basedir}/../..:/work" />
8888
<arg value="-w" />
8989
<arg value="/work/core/org.eclipse.cdt.core.native" />
90-
<arg value="quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest" />
90+
<arg value="quay.io/eclipse-cdt/cdt-infra:latest" />
9191
<arg value="make" />
9292
<arg value="-C" />
9393
<arg value="native_src" />
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docker/Readme.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
Dockerfiles
22
============
33

4-
The docker images for Eclipse CDT's [Jenkins instance](https://ci.eclipse.org/cdt/) are stored at [quay.io](https://quay.io/organization/eclipse-cdt)
5-
and built using the following scripts. The individual directories below this one contain Dockerfiles which contain a little more information. Note that
6-
the split between the Dockerfiles is somewhat arbitrary and historical. Only the cdt-infra-eclipse-full image is known to be referenced outside
7-
of the cdt repo.
4+
The docker images for Eclipse CDT's [Jenkins instance](https://ci.eclipse.org/cdt/) and [GitHub Action check code cleanliness](https://github.com/eclipse-cdt/cdt/blob/main/.github/workflows/code-cleanliness.yml) are stored at [quay.io](https://quay.io/organization/eclipse-cdt) and built using the following scripts.
5+
The individual directories below this one contain Dockerfiles which contain a little more information.
86

97
build-images.sh
108
===============
119

12-
Builds the images locally. A download of [Xcode_9.4.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip) (visit [here](https://developer.apple.com/download/more/) first to logon to Apple if needed) is needed to do a complete build. To save on rebuild times, the xip can be removed from the directory to use the cached cdt-infra-build-macos-sdk image.
10+
Builds the images locally. A download of [Xcode_13.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_13.1.xip/Xcode_13.1.xip.xip) (visit [here](https://developer.apple.com/download/more/) first to logon to Apple if needed) is needed to do a complete build. To save on rebuild times, the xip can be removed from the directory to use the cached cdt-infra-build-macos-sdk image.
1311

1412
deploy-images.sh
1513
================
@@ -20,14 +18,14 @@ updates all the Jenkinsfile and yaml files to refer to these new images.
2018
Using the docker images
2119
=======================
2220

23-
The docker images exist mostly for use in Jenkins, see the [pod templates](https://github.com/eclipse-cdt/cdt/blob/main/jenkins/pod-templates).
21+
The docker images exist mostly for use in Jenkins and GitHub Actions, see the [pod templates](https://github.com/eclipse-cdt/cdt/blob/main/jenkins/pod-templates) and [workflows](https://github.com/eclipse-cdt/cdt/blob/main/.github/workflows/)
2422

2523
They can be used to recreate a consistent environment in other cases too. For example, you can run a full build on a machine that does not already have the tools by using docker:
2624

2725
```
28-
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest COMMAND HERE
26+
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra:latest COMMAND HERE
2927
```
3028

31-
For examples of the above in practice, see [cdt-gdb-adapter's integration tests readme](https://github.com/eclipse-cdt/cdt-gdb-adapter/blob/master/src/integration-tests/README.md) and the native section of [CDT's readme](https://github.com/eclipse-cdt/cdt/blob/main/BUILDING.md#native)
29+
For examples of the above in practice, see the native section of [CDT's building readme](https://github.com/eclipse-cdt/cdt/blob/main/BUILDING.md#native)
3230

3331

docker/build-images.sh

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ set -eux
55
# Xcode_13.1.xip is needed to build the OSx cross compiler image from https://developer.apple.com/download/all/?q=xcode
66
# As an optimization for the rebuild times, the image is only built if the xip is present.
77
if [ -f Xcode_13.1.xip ]; then
8-
docker build --rm --build-arg Xcodexip=Xcode_13.1.xip -f cdt-infra-build-macos-sdk/ubuntu-18.04/Dockerfile -t cdt-infra-build-macos-sdk:ubuntu-18.04 .
8+
docker build --rm --build-arg Xcodexip=Xcode_13.1.xip -f cdt-infra-build-macos-sdk/Dockerfile -t cdt-infra-build-macos-sdk:latest .
99
else
1010
echo "MacOSX SDK & Toolchain build is being skipped"
1111
fi
1212

13-
docker build --rm -f cdt-infra-base/ubuntu-18.04/Dockerfile -t cdt-infra-base:ubuntu-18.04 .
14-
docker build --rm -f cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile -t cdt-infra-all-gdbs:ubuntu-18.04 .
15-
docker build --rm -f cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile -t cdt-infra-eclipse-full:ubuntu-18.04 .
16-
docker build --rm -f cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install:ubuntu-18.04 .
17-
docker build --rm -f cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install-github:ubuntu-18.04 .
18-
docker build --rm -f cdt-infra-plus-node/ubuntu-18.04/Dockerfile -t cdt-infra-plus-node:ubuntu-18.04 .
13+
docker build --rm -f cdt-infra/Dockerfile -t cdt-infra:latest .
14+
docker build --rm -f cdt-infra-github/Dockerfile -t cdt-infra-github:latest .
15+
docker build --rm -f cdt-infra-jipp/Dockerfile -t cdt-infra-jipp:latest .

docker/cdt-infra-all-gdbs/Readme.md

-26
This file was deleted.

docker/cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile

-42
This file was deleted.

docker/cdt-infra-base/Readme.md

-2
This file was deleted.

docker/cdt-infra-build-macos-sdk/ubuntu-18.04/Dockerfile docker/cdt-infra-build-macos-sdk/Dockerfile

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
# This dockerfile is used to build the MacOSX SDK
2-
FROM ubuntu:18.04
2+
FROM ubuntu:20.04
33

4-
RUN apt-get update
5-
RUN apt-get install -y clang make build-essential
6-
RUN apt-get install -y libssl-dev lzma-dev liblzma-dev libxml2-dev git patch python cpio bzip2 xz-utils libbz2-dev
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
RUN apt update
6+
RUN apt install -y clang make build-essential libssl-dev lzma-dev liblzma-dev libxml2-dev git patch python3 cpio bzip2 xz-utils libbz2-dev curl
77

8-
# cmake in Ubuntu is too old to build osxcross, therefore
9-
# use this version
10-
RUN apt-get install -y curl
118
RUN curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-x86_64.tar.gz | tar xzf - -C /usr/share
129
ENV PATH="/usr/share/cmake-3.29.2-linux-x86_64/bin:${PATH}"
1310

14-
1511
# Xcode_13.1.xip needs to be downloaded from
1612
# https://developer.apple.com/download/all/?q=xcode - specically:
1713
ARG Xcodexip=Xcode_13.1.xip
@@ -29,7 +25,7 @@ ENV UNATTENDED=1
2925
RUN cd /opt/osxcross && ./build.sh
3026

3127
# Start next stage build
32-
FROM ubuntu:18.04
28+
FROM ubuntu:20.04
3329
COPY --from=0 /opt/osxcross/target /opt/osxcross/target
3430
ENV PATH="/opt/osxcross/target/bin:${PATH}"
3531
# At this point the osxcross toolchain is not usable,

docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile

-61
This file was deleted.

docker/cdt-infra-github/Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM cdt-infra:latest
2+
USER root
3+
4+
RUN chown -R 1001:0 ${HOME} \
5+
&& chmod -R g+rwX ${HOME}
6+
7+
USER 1001
8+
9+
CMD ["/home/vnc/.vnc/xstartup.sh"]

docker/cdt-infra-jipp/Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM cdt-infra:latest
2+
USER root
3+
4+
RUN chown -R 1000:0 ${HOME} \
5+
&& chmod -R g+rwX ${HOME}
6+
7+
USER 1000
8+
9+
CMD ["/home/vnc/.vnc/xstartup.sh"]

docker/cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile

-25
This file was deleted.

0 commit comments

Comments
 (0)