Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (33 loc) · 1.86 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (33 loc) · 1.86 KB
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
# The ParaMesh container image (X-package): the same files the installer puts in /opt/paramesh,
# with pmd and the website started by tools/setup/docker-entrypoint.sh.
#
# docker run -d --name paramesh --network host --security-opt seccomp=unconfined --init \
# ghcr.io/group21-computer-networks/paramesh
#
# Host networking is needed: discovery uses UDP multicast and jobs open TCP ports of their own.
# Docker's default seccomp profile blocks userfaultfd, even with SYS_PTRACE, so it is turned off.
FROM ubuntu:24.04 AS build
RUN apt-get update \
&& apt-get install -y --no-install-recommends cmake ninja-build g++ git python3 ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY . /src
RUN /src/tools/setup/package.sh /dist \
&& mkdir -p /opt/paramesh \
&& file="$(ls /dist/paramesh-setup-*.sh)" \
&& line="$(awk '/^__PAYLOAD__$/ {print NR + 1; exit}' "$file")" \
&& tail -n +"$line" "$file" | tar -xz -C /opt/paramesh
FROM ubuntu:24.04
LABEL org.opencontainers.image.source="https://github.com/Group21-Computer-Networks/Paramesh" \
org.opencontainers.image.description="ParaMesh: distributed shared memory for a pool of Linux machines" \
org.opencontainers.image.licenses="NOASSERTION"
# gcc and pkg-config build programs against the library; the playground compiles with them too.
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 gcc g++ libc6-dev pkg-config \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /opt/paramesh /opt/paramesh
COPY tools/setup/docker-entrypoint.sh /usr/local/bin/paramesh-start
RUN for tool in pmd pm pmrun; do ln -s /opt/paramesh/bin/$tool /usr/local/bin/$tool; done \
&& mkdir -p /usr/lib/pkgconfig && ln -s /opt/paramesh/lib/pkgconfig/paramesh.pc /usr/lib/pkgconfig/paramesh.pc
WORKDIR /opt/paramesh/apps
EXPOSE 47000/udp 47001/tcp 47002/tcp 47080/tcp
ENTRYPOINT ["paramesh-start"]