forked from xagau/Placeholders-X16R
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ubuntu.Dockerfile
51 lines (46 loc) · 1.43 KB
/
ubuntu.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
FROM veriblock/prerelease-btc
ADD . /app
WORKDIR /app
ARG BUILD_TYPE=Release
RUN pip3 install cmake
ENV BUILD=${BUILD_TYPE}
RUN export VERIBLOCK_POP_CPP_VERSION=$(awk -F '=' '/\$\(package\)_version/{print $NF}' $PWD/depends/packages/veriblock-pop-cpp.mk | head -n1); \
(\
cd /opt; \
wget https://github.com/VeriBlock/alt-integration-cpp/archive/${VERIBLOCK_POP_CPP_VERSION}.tar.gz; \
tar -xf ${VERIBLOCK_POP_CPP_VERSION}.tar.gz; \
cd alt-integration-cpp-${VERIBLOCK_POP_CPP_VERSION}; \
mkdir build; \
cd build; \
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DTESTING=OFF; \
make -j2 install \
)
RUN ./autogen.sh
RUN if [ ${BUILD_TYPE} = "Release" ]; then \
CC=gcc-7 CXX=g++-7 ./configure \
--without-gui \
--disable-tests \
--disable-bench \
--disable-ccache \
--disable-man \
--with-libs=no; \
else \
CC=gcc-7 CXX=g++-7 ./configure \
--enable-debug \
--without-gui \
--disable-tests \
--disable-bench \
--disable-ccache \
--disable-man \
--with-libs=no; \
fi
RUN make -j4 install
# remove source files to decrease image size
RUN rm -rf /app
ENV DATA_DIR=/home/placeh/.placeh
RUN groupadd -r --gid 1001 placeh
RUN useradd --no-log-init -r --uid 1001 --gid 1001 --create-home --shell /bin/bash placeh
RUN mkdir -p ${DATA_DIR}
RUN chown -R 1001:1001 ${DATA_DIR}
USER placeh
WORKDIR $DATA_DIR