-
Notifications
You must be signed in to change notification settings - Fork 202
/
ubuntu22.04.dockerfile
75 lines (67 loc) · 2.35 KB
/
ubuntu22.04.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
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y ca-certificates
# Intel's RSA-2048 key signing the intel-sgx/sgx_repo repository. Expires 2027-03-20.
# https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key
COPY .ci/intel-sgx-deb.key /etc/apt/keyrings/intel-sgx-deb.asc
RUN echo deb [arch=amd64 signed-by=/etc/apt/keyrings/intel-sgx-deb.asc] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main > /etc/apt/sources.list.d/intel-sgx.list
# Dependencies for actual build.
# NOTE: COPY invalidates docker cache when source file changes,
# so `apt-get build-dep` will rerun if dependencies change, despite no change
# in dockerfile.
RUN mkdir /debian
COPY debian/control /debian
RUN apt-get update && apt-get -y build-dep --no-install-recommends --no-install-suggests /
RUN rm -rf /debian
# runtime dependencies of Gramine, for running tests
# keep this synced with debian/control
RUN apt-get update && apt-get satisfy -y \
'libcurl4 (>= 7.58)' \
'libprotobuf-c1' \
'python3' \
'python3 (>= 3.10) | python3-pkg-resources' \
'python3-click (>= 6.7)' \
'python3-cryptography' \
'python3-jinja2' \
'python3-pyelftools' \
'python3-tomli (>= 1.1.0)' \
'python3-tomli-w (>= 0.4.0)' \
'python3-voluptuous'
# dependencies for various tests, CI-Examples, etc.
# git: scripts/gitignore-test (among others)
# libunwind8: libos/test/regression/bootstrap_cpp.manifest.template
# nginx: CI-Examples/ra-tls-nginx
# shellcheck: .ci/run-shellcheck
# cargo: CI-Examples/rust
# clang: asan and ubsan builds
# jq: used in jenkinsfiles
# cpio dwarves gcc/g++-12 kmod qemu-kvm: for building kernel modules and running VMs
# wget: scripts/download
RUN apt-get update && apt-get install -y \
cargo \
clang \
cmake \
cpio \
curl \
dwarves \
flex \
g++-12 \
gawk \
gcc-12 \
gdb \
gettext \
git \
jq \
kmod \
libunwind8 \
nginx \
python3-pytest \
qemu-kvm \
shellcheck \
wget
# Kernel on the host machine is built with GCC-12, so we need to set it as default in Docker
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10 && \
update-alternatives --set gcc /usr/bin/gcc-12 && \
update-alternatives --set g++ /usr/bin/g++-12
CMD ["bash"]