-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-daos-wrapper
92 lines (70 loc) · 2.65 KB
/
Dockerfile-daos-wrapper
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
#
# Copyright 2018, Intel Corporation
#
# 'recipe' for Docker to build an image of centOS-based
# environment for building the DAOS project.
#
# Pull base image
FROM centos:7
# Build arguments can be set via -build-arg
# set NOBUILD to disable git clone & build
ARG NOBUILD
# use same UID as host and default value of 1000 if not specified
ARG UID=1000
# For building project, change it to threads you want to use
ARG CORES=72
ENV USER daos
ENV PASSWD daos
# Chinese user can use tsinghua mirror to speed up yum
COPY CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
# Install basic tools
RUN yum makecache; \
yum install -y epel-release yum-plugin-copr; \
yum -y copr enable jhli/ipmctl; \
yum -y copr enable jhli/safeclib; \
yum install -y --nogpgcheck boost-devel clang-analyzer cmake CUnit-devel doxygen flex \
gcc gcc-c++ git golang graphviz make lcov meson nasm numactl-devel \
ninja-build openssl-devel readline-devel pandoc patch scons sg3_utils \
valgrind valgrind-devel yasm \
libaio-devel libcmocka libcmocka-devel libevent-devel libibverbs-devel \
libiscsi-devel librdmacm-devel libtool libtool-ltdl-devel \
libuuid-devel libyaml-devel \
python python-jwt python-pep8 python-virtualenv \
python2-pip python2-pygithub python34-pip python34-pygithub pylint \
libipmctl-devel; \
yum clean all
RUN useradd -u $UID -ms /bin/bash $USER ;echo "$USER:$PASSWD" | chpasswd
# Create directory for DAOS backend storage
RUN mkdir -p /mnt/daos; chown $UID /mnt/daos
# change this to use your proxy
#ENV HTTP_PROXY child-prc.intel.com:913
#RUN git config --global https.proxy "${HTTP_PROXY}"; \
# printf "proxy = %s\n" "${HTTP_PROXY}" >> ~/.curlrc
# Build daos
RUN git clone https://github.com/daos-stack/daos.git; \
cd daos; \
git submodule init; \
git submodule update; \
scons --config=force --build-deps=yes -j ${CORES} PREFIX=/usr/local/daos install
# Update environment variables
ENV PATH "/usr/local/daos/bin:/usr/local/daos/sbin:${PATH}"
ENV CPATH "/usr/local/daos/lib:${CPATH}"
ENV LD_LIBRARY_PATH "/usr/local/daos/lib:/usr/local/daos/lib64:$LD_LIBRARY_PATH"
ENV DAOS_HOME "/usr/local/daos"
ENV CRT_PHY_ADDR_STR "ofi+sockets"
ENV OFI_INTERFACE "eth0"
ENV CRT_ATTACH_INFO_PATH "/home/${USER}"
ENV DAOS_SINGLETON_CLI 1
# Setup runtime directories
RUN mkdir /var/run/daos_server; \
mkdir /var/run/daos_agent; \
chmod 755 /var/run/daos_server; \
chmod 755 /var/run/daos_agent; \
chown $USER:$USER /var/run/daos_server; \
chown $USER:$USER /var/run/daos_agent
COPY start_server.sh /home/daos/
RUN chmod +x /home/daos/start_server.sh
# Switch to new user
USER $USER
WORKDIR /home/$USER
CMD ["/bin/bash"]