-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[irods/irods#7266] Add Dockerfiles for Debian 12
- Loading branch information
1 parent
979cab9
commit 146e046
Showing
6 changed files
with
420 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
|
||
ARG debugger_base=debian:12 | ||
FROM ${debugger_base} | ||
|
||
SHELL [ "/bin/bash", "-c" ] | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Re-enable apt caching for RUN --mount | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache | ||
|
||
# Make sure we're starting with an up-to-date image | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get autoremove -y --purge && \ | ||
rm -rf /tmp/* | ||
# To mark all installed packages as manually installed: | ||
#apt-mark showauto | xargs -r apt-mark manual | ||
|
||
ARG parallelism=3 | ||
ARG tools_prefix=/opt/debug_tools | ||
|
||
RUN mkdir -p ${tools_prefix} | ||
|
||
WORKDIR /tmp | ||
|
||
#-------- | ||
# gdb | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
gdb \ | ||
gdbserver \ | ||
&& \ | ||
apt-get remove -y python3-dev && \ | ||
rm -rf /tmp/* | ||
|
||
#-------- | ||
# rr | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
python3-urllib3 \ | ||
binutils \ | ||
wget \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
ARG rr_version="5.6.0" | ||
|
||
RUN wget "https://github.com/rr-debugger/rr/releases/download/${rr_version}/rr-${rr_version}-Linux-x86_64.deb" && \ | ||
dpkg -i "rr-${rr_version}-Linux-x86_64.deb" && \ | ||
rm -rf /tmp/* | ||
|
||
#-------- | ||
# valgrind | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
valgrind \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
#-------- | ||
# lldb | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
lldb \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
#-------- | ||
# xmlrunner | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
python3-xmlrunner \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
#-------- | ||
# utils | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
tmux \ | ||
vim \ | ||
nano \ | ||
tig \ | ||
coreutils \ | ||
python3-pexpect \ | ||
iproute2 \ | ||
&& \ | ||
rm -rf /tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
|
||
FROM debian:12 | ||
|
||
SHELL [ "/bin/bash", "-c" ] | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Re-enable apt caching for RUN --mount | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache | ||
|
||
# Make sure we're starting with an up-to-date image | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get autoremove -y --purge && \ | ||
rm -rf /tmp/* | ||
# To mark all installed packages as manually installed: | ||
#apt-mark showauto | xargs -r apt-mark manual | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
sudo \ | ||
git \ | ||
python3 \ | ||
python3-distro \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
ARG externals_repo="https://github.com/irods/externals" | ||
ARG externals_branch="main" | ||
|
||
WORKDIR /externals | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
git clone "${externals_repo}" -b "${externals_branch}" /externals && \ | ||
./install_prerequisites.py && \ | ||
rm -rf /externals /tmp/* | ||
|
||
ENV file_extension="deb" | ||
ENV package_manager="apt-get" | ||
|
||
WORKDIR / | ||
COPY --chmod=755 build_and_copy_externals_to_dir.sh / | ||
ENTRYPOINT ["./build_and_copy_externals_to_dir.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
|
||
FROM debian:12 | ||
|
||
SHELL [ "/bin/bash", "-c" ] | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Re-enable apt caching for RUN --mount | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache | ||
|
||
# Make sure we're starting with an up-to-date image | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get autoremove -y --purge && \ | ||
rm -rf /tmp/* | ||
# To mark all installed packages as manually installed: | ||
#apt-mark showauto | xargs -r apt-mark manual | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
apt-transport-https \ | ||
ccache \ | ||
g++-12 \ | ||
gcc \ | ||
gcc-12 \ | ||
git \ | ||
gnupg \ | ||
help2man \ | ||
libbz2-dev \ | ||
libcurl4-gnutls-dev \ | ||
libfuse-dev \ | ||
libjson-perl \ | ||
libkrb5-dev \ | ||
libpam0g-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
lsb-release \ | ||
lsof \ | ||
make \ | ||
ninja-build \ | ||
odbc-postgresql \ | ||
postgresql \ | ||
python3 \ | ||
python3-dev \ | ||
python3-distro \ | ||
python3-jsonschema \ | ||
python3-packaging \ | ||
python3-psutil \ | ||
python3-pyodbc \ | ||
python3-requests \ | ||
sudo \ | ||
super \ | ||
unixodbc-dev \ | ||
wget \ | ||
zlib1g-dev \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
--mount=type=cache,target=/root/.cache/pip,sharing=locked \ | ||
--mount=type=cache,target=/root/.cache/wheel,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
python3-pip \ | ||
&& \ | ||
pip3 install --break-system-packages lief && \ | ||
rm -rf /tmp/* | ||
|
||
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - && \ | ||
echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/renci-irods.list && \ | ||
wget -qO - https://core-dev.irods.org/irods-core-dev-signing-key.asc | apt-key add - && \ | ||
echo "deb [arch=amd64] https://core-dev.irods.org/apt/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/renci-irods-core-dev.list | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
'irods-externals*' \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
RUN update-alternatives --install /usr/local/bin/gcc gcc /usr/bin/gcc-12 1 && \ | ||
update-alternatives --install /usr/local/bin/g++ g++ /usr/bin/g++-12 1 && \ | ||
hash -r | ||
|
||
ARG cmake_path="/opt/irods-externals/cmake3.21.4-0/bin" | ||
ENV PATH ${cmake_path}:$PATH | ||
|
||
ENV file_extension "deb" | ||
ENV package_manager "apt-get" | ||
|
||
ENV CCACHE_DIR="/irods_build_cache" | ||
# Default to a reasonably large cache size | ||
ENV CCACHE_MAXSIZE="64G" | ||
# Allow for a lot of files (1.5M files, 300 per directory) | ||
ENV CCACHE_NLEVELS="3" | ||
# Allow any uid to use cache | ||
ENV CCACHE_UMASK="000" | ||
|
||
COPY --chmod=755 build_and_copy_packages_to_dir.sh / | ||
ENTRYPOINT ["./build_and_copy_packages_to_dir.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
# | ||
# iRODS Runner | ||
# | ||
ARG runner_base=debian:12 | ||
FROM ${runner_base} as irods-runner | ||
|
||
SHELL [ "/bin/bash", "-c" ] | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Re-enable apt caching for RUN --mount | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \ | ||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache | ||
|
||
# Make sure we're starting with an up-to-date image | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get autoremove -y --purge && \ | ||
rm -rf /tmp/* | ||
# To mark all installed packages as manually installed: | ||
#apt-mark showauto | xargs -r apt-mark manual | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
apt-transport-https \ | ||
wget \ | ||
lsb-release \ | ||
sudo \ | ||
gnupg \ | ||
rsyslog \ | ||
python3 \ | ||
python3-psutil \ | ||
python3-requests \ | ||
python3-jsonschema \ | ||
python3-pyodbc \ | ||
python3-distro \ | ||
libssl3 \ | ||
super \ | ||
lsof \ | ||
postgresql \ | ||
odbc-postgresql \ | ||
libjson-perl \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
# install and configure rsyslog | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
rsyslog \ | ||
&& \ | ||
rm -rf /tmp/* | ||
COPY irods.rsyslog /etc/rsyslog.d/00-irods.conf | ||
COPY irods.logrotate /etc/logrotate.d/irods | ||
|
||
# irodsauthuser required for some tests | ||
# UID and GID ranges picked to hopefully not overlap with anything | ||
RUN useradd \ | ||
--key UID_MIN=40050 \ | ||
--key UID_MAX=49000 \ | ||
--key GID_MIN=40050 \ | ||
--key GID_MAX=49000 \ | ||
--create-home \ | ||
--shell /bin/bash \ | ||
irodsauthuser && \ | ||
echo 'irodsauthuser:;=iamnotasecret' | chpasswd | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
vim \ | ||
nano \ | ||
rsyslog \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - && \ | ||
echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/renci-irods.list && \ | ||
wget -qO - https://core-dev.irods.org/irods-core-dev-signing-key.asc | apt-key add - && \ | ||
echo "deb [arch=amd64] https://core-dev.irods.org/apt/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/renci-irods-core-dev.list | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
'irods-externals*' \ | ||
&& \ | ||
rm -rf /tmp/* | ||
|
||
COPY ICAT.sql / | ||
COPY --chmod=755 keep_alive.sh /keep_alive.sh | ||
ENTRYPOINT ["/keep_alive.sh"] |
Oops, something went wrong.