-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathirods_core_builder.ubuntu20.Dockerfile
103 lines (91 loc) · 3.12 KB
/
irods_core_builder.ubuntu20.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# syntax=docker/dockerfile:1.5
FROM ubuntu:20.04
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 \
--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 \
apt-transport-https \
ccache \
cmake \
g++-10 \
gcc \
gcc-10 \
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-pip \
python3-distro \
python3-jsonschema \
python3-packaging \
python3-psutil \
python3-pyodbc \
python3-requests \
sudo \
super \
unixodbc-dev \
wget \
zlib1g-dev \
flex \
bison \
&& \
pip3 install 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-10 1 && \
update-alternatives --install /usr/local/bin/g++ g++ /usr/bin/g++-10 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"]