-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (56 loc) · 1.61 KB
/
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
FROM debian:jessie-slim
MAINTAINER Christian Kotte <prism42@icloud.com>
# permissions
ARG CONTAINER_UID=1000
ARG CONTAINER_GID=1000
# Setup useful environment variables
ENV STRATIS_PACKAGE=stratisX
ENV STRATIS_REPO=https://github.com/stratisproject/${STRATIS_PACKAGE}.git \
STRATIS_DATA_DIR=/var/lib/stratis \
STRATIS_RUN_DIR=/var/run/stratis
COPY imagescripts/* /usr/bin/
# Install stratisX
RUN export CONTAINER_USER=stratis && \
export CONTAINER_GROUP=stratis && \
addgroup --gid $CONTAINER_GID $CONTAINER_GROUP && \
adduser --uid $CONTAINER_UID \
--ingroup $CONTAINER_GROUP \
--home /home/$CONTAINER_USER \
--shell /bin/bash \
--system $CONTAINER_USER && \
# Install packages
apt-get update && apt-get install -y \
build-essential \
git \
g++ \
libtool \
make \
libboost-all-dev \
libssl-dev \
libdb++-dev \
libdb5.3++-dev \
libdb5.3-dev \
libminiupnpc-dev \
libqrencode-dev \
wget \
unzip \
vim && \
# Clone and build from source
cd /tmp && \
git clone $STRATIS_REPO && \
cd $STRATIS_PACKAGE/src && \
make -f makefile.unix && \
strip stratisd && \
# Install stratisd to /usr/bin
mv stratisd /usr/bin && \
chmod +x /usr/bin/stratisd-* && \
mkdir -p $STRATIS_RUN_DIR && \
mkdir -p $STRATIS_DATA_DIR && \
# Clean caches and tmps
rm -rf /var/cache/apk/* && \
rm -rf /tmp/$STRATIS_PACKAGE
# Make default port available
EXPOSE 16174
USER stratis
WORKDIR ${STRATIS_RUN_DIR}
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]