Skip to content

Commit aac69d6

Browse files
authored
Merge pull request #1184 from openziti/dist-image-redhat-10
add linux package for redhat10; use redhat 10 in docker images
2 parents b88d162 + 777bf37 commit aac69d6

File tree

12 files changed

+156
-1
lines changed

12 files changed

+156
-1
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ARG CMAKE_VERSION="3.26.3"
2+
3+
FROM quay.io/almalinuxorg/almalinux:10.0-20250611
4+
5+
ARG CMAKE_VERSION
6+
7+
LABEL org.opencontainers.image.authors="[email protected]"
8+
9+
USER root
10+
WORKDIR /root/
11+
12+
ENV PATH="/usr/local/:${PATH}"
13+
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
14+
ENV TZ=UTC
15+
16+
RUN dnf update --assumeyes \
17+
&& dnf install --assumeyes \
18+
"@Development Tools" \
19+
dnf-plugins-core \
20+
iproute \
21+
python3 \
22+
systemd-devel \
23+
zlib-devel \
24+
systemd-rpm-macros \
25+
cmake-rpm-macros \
26+
perl-FindBin perl-IPC-Cmd perl-File-Compare perl-File-Copy \
27+
libatomic \
28+
&& dnf config-manager --set-enabled crb \
29+
&& dnf install --assumeyes \
30+
doxygen \
31+
graphviz \
32+
git \
33+
json-c-devel \
34+
protobuf-c-devel \
35+
openssl-devel \
36+
ninja-build \
37+
&& dnf clean all
38+
39+
RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh -o cmake.sh \
40+
&& (bash cmake.sh --skip-license --prefix=/usr/local) \
41+
&& rm cmake.sh
42+
43+
ENV GIT_CONFIG_GLOBAL="/tmp/ziti-builder-gitconfig"
44+
45+
ENV VCPKG_ROOT=/usr/local/vcpkg
46+
ENV VCPKG_BINARY_SOURCES="clear;files,/github/workspace/vcpkg_cache/archives,readwrite"
47+
ENV VCPKG_DOWNLOADS=/github/workspace/vcpkg_cache/downloads
48+
ENV VCPKG_INSTALLED_DIR=/github/workspace/vcpkg_cache/installed
49+
50+
ENV VCPKG_FORCE_SYSTEM_BINARIES=yes
51+
52+
RUN cd /usr/local \
53+
&& git clone https://github.com/microsoft/vcpkg \
54+
&& chmod -R ugo+rwX /usr/local/vcpkg
55+
56+
WORKDIR /github/workspace
57+
COPY ./entrypoint.sh /root/
58+
ENTRYPOINT [ "/root/entrypoint.sh" ]
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/usr/bin/env bash
2+
#
3+
# RedHat 10
4+
#
5+
6+
set -euxo pipefail
7+
8+
# these commands must be in the entrypoint so they are run after workspace is mounted on Docker workdir
9+
echo "INFO: GIT_DISCOVERY_ACROSS_FILESYSTEM=${GIT_DISCOVERY_ACROSS_FILESYSTEM}"
10+
echo "INFO: WORKDIR=${PWD}"
11+
echo "INFO: $(git --version)"
12+
13+
# if first positional is an expected arch string then set cmake preset,
14+
# else use ci-linux-x64 (which actually just uses native/host tools - e.g. not cross compile)
15+
if [ ${#} -ge 1 ]; then
16+
cmake_preset="${1}"
17+
else
18+
cmake_preset="ci-linux-x64"
19+
fi
20+
21+
if [ ${#} -ge 2 ]; then
22+
cmake_config="${2}"
23+
else
24+
cmake_config="RelWithDebInfo"
25+
fi
26+
27+
# workspace dir for each build env is added to "safe" dirs in global config e.g.
28+
# ~/.gitconfig so both runner and builder containers trust these dirs
29+
# owned by different UIDs from that of Git's EUID. This is made necessary
30+
# by newly-enforced directory boundaries in Git v2.35.2
31+
# ref: https://lore.kernel.org/git/[email protected]/
32+
for SAFE in \
33+
/github/workspace \
34+
/__w/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c \
35+
/mnt \
36+
/usr/local/vcpkg
37+
do
38+
git config --global --add safe.directory ${SAFE}
39+
done
40+
41+
for CACHE in \
42+
/github/workspace/vcpkg_cache/{archives,downloads,installed}
43+
do
44+
mkdir -p ${CACHE}
45+
done
46+
47+
(
48+
cd "${VCPKG_ROOT}"
49+
git checkout master
50+
git pull
51+
./bootstrap-vcpkg.sh -disableMetrics
52+
)
53+
54+
(
55+
[[ -d ./build ]] && rm -r ./build
56+
cmake -E make_directory ./build
57+
# allow unset for scl_source scripts
58+
set +u
59+
cmake \
60+
--preset "${cmake_preset}" \
61+
-DCMAKE_BUILD_TYPE="${cmake_config}" \
62+
-DVCPKG_OVERLAY_PORTS=./.github/actions/openziti-tunnel-build-action/redhat-9/vcpkg-overlays \
63+
-DBUILD_DIST_PACKAGES=ON \
64+
"${TLSUV_TLSLIB:+-DTLSUV_TLSLIB=${TLSUV_TLSLIB}}" \
65+
-S . \
66+
-B ./build
67+
cmake \
68+
--build ./build \
69+
--config "${cmake_config}" \
70+
--target package \
71+
--verbose
72+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "json-c",
3+
"version": "0"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "openssl",
3+
"version": "0"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "protobuf-c",
3+
"version": "0"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "zlib",
3+
"version": "0"
4+
}

0 commit comments

Comments
 (0)