This commit is contained in:
Jeffrey Paul 2016-08-18 12:19:41 +02:00
commit 2c9c10924f
5 changed files with 115 additions and 0 deletions

81
Dockerfile Normal file
View File

@ -0,0 +1,81 @@
FROM phusion/baseimage:0.9.19
ENV STEEMD_REV master
ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
ARG STEEMD_REPO=https://github.com/steemit/steem.git
RUN sed -i \
-e s#http://archive.ubuntu.com/ubuntu/#${UBUNTU_MIRROR}#g \
-e s#http://security.ubuntu.com/ubuntu/#${UBUNTU_MIRROR}#g \
/etc/apt/sources.list ; \
cat /etc/apt/sources.list
RUN \
apt-get update && \
apt-get install -y \
automake \
autotools-dev \
bsdmainutils \
build-essential \
cmake \
git \
libboost-chrono-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
libevent-dev \
libminiupnpc-dev \
libssl-dev \
libtool \
libzmq3-dev \
libzmq5 \
pkg-config \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN \
git clone $STEEMD_REPO /usr/local/src/steem && \
cd /usr/local/src/steem && \
git checkout $STEEMD_REV && \
./autogen.sh && \
./configure --enable-hardening && \
make -j2 && \
make install && \
cd / && \
rm -rf /usr/local/src/steem
RUN \
apt-get remove -y \
automake \
autotools-dev \
bsdmainutils \
build-essential \
git \
libtool \
pkg-config \
&& \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV HOME /var/lib/steemd
RUN useradd -s /bin/bash -m -d /var/lib/steemd steemd
RUN chown steemd:steemd -R /var/lib/steemd
VOLUME ["/var/lib/steemd"]
EXPOSE 8332
EXPOSE 8333
RUN mkdir -p /etc/service/steemd
ADD steemd.run /etc/service/steemd/run
RUN mkdir -p /etc/service/steemd/log
ADD steemd.log.run /etc/service/steemd/log/run
RUN chmod +x /etc/service/steemd/log/run \
/etc/service/steemd/run

11
Makefile Normal file
View File

@ -0,0 +1,11 @@
default: build
build: kill
docker build -t sneak/steemd .
run: kill
docker run --name sneak-steemd -d sneak/steemd
docker logs -f sneak-steemd
kill:
-docker rm -f sneak-steemd

7
README.markdown Normal file
View File

@ -0,0 +1,7 @@
# sneak/steemd docker image
* wallet support disabled
# Versions
* sneak/steemd:latest -> steem master

2
steemd.log.run Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec chpst -usyslog logger -t steemd

14
steemd.run Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
export HOME="/var/lib/steem"
# gen random pw for rpc server
RANDOMPW=$(dd if=/dev/urandom bs=10 count=1 status=none |
shasum | cut -b 1-20)
chown -R steem:steem $HOME
exec chpst -usteem \
steemd $ARGS \
$STEEMD_EXTRA_OPTS \
2>&1