-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.plotlabserver_build
54 lines (37 loc) · 1.57 KB
/
Dockerfile.plotlabserver_build
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
ARG PROJECT
ARG PLOTLABLIB_TAG="latest"
FROM plotlablib:${PLOTLABLIB_TAG} AS plotlablib
FROM libzmq:latest as libzmq
FROM cppzmq:latest as cppzmq
FROM ubuntu:20.04 as plotlabserver_requirements_base
ARG PROJECT
ARG REQUIREMENTS_FILE="requirements.${PROJECT}.ubuntu20.04.system"
RUN mkdir -p /tmp/${PROJECT}/files
COPY files/${REQUIREMENTS_FILE} /tmp/${PROJECT}/files
WORKDIR /tmp/${PROJECT}/files
RUN apt-get update && \
apt-get install --no-install-recommends -y checkinstall && \
DEBIAN_FRONTEND=noninteractive xargs apt-get install --no-install-recommends -y < ${REQUIREMENTS_FILE} && \
rm -rf /var/lib/apt/lists/*
COPY --from=plotlablib /tmp/plotlablib /tmp/plotlablib
WORKDIR /tmp/plotlablib/plotlablib/build
RUN cmake --install . --prefix /tmp/${PROJECT}/${PROJECT}/build/install
RUN cmake --install . && ldconfig
COPY --from=libzmq /tmp/libzmq /tmp/libzmq
WORKDIR /tmp/libzmq/build
RUN cmake --install . --prefix /tmp/${PROJECT}/${PROJECT}/build/install
RUN cmake --install . && ldconfig
COPY --from=cppzmq /tmp/cppzmq /tmp/cppzmq
WORKDIR /tmp/cppzmq/build
RUN cmake --install . --prefix /tmp/${PROJECT}/${PROJECT}/build/install
RUN cmake --install . && ldconfig
SHELL ["/bin/bash", "-c"]
COPY . /tmp/plotlabserver
FROM plotlabserver_requirements_base AS plotlabserver_builder
WORKDIR /tmp/${PROJECT}
RUN cd "plotlabserver/include/plotlabserver" && \
ln -sf ../../../stb/stb_image.h stb_image.h
RUN cd "/tmp/${PROJECT}/plotlabserver" && \
bash build.sh
#FROM alpine:3.14 AS plotlabserver_package
#COPY --from=plotlabserver_builder /tmp/${PROJECT} /tmp/${PROJECT}