-
-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from zcoinofficial/docker
Add Dockerfile for zcoind
- Loading branch information
Showing
2 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# ide stuff | ||
.project | ||
.cproject | ||
.vscode | ||
|
||
# build output | ||
**/*.exe | ||
src/zcoin | ||
src/zcoind | ||
src/zcoin-cli | ||
src/zcoin-tx | ||
src/test/test_zcoin | ||
src/test/test_zcoin_fuzzy | ||
src/qt/test/test_zcoin-qt | ||
|
||
# autoreconf | ||
**/*.tar.gz | ||
**/Makefile.in | ||
**/aclocal.m4 | ||
**/autom4te.cache | ||
**/config.log | ||
**/config.status | ||
**/configure | ||
**/libtool | ||
**/stamp-h1 | ||
**/config.guess | ||
**/config.sub | ||
**/depcomp | ||
**/install-sh | ||
**/ltmain.sh | ||
**/libtool.m4 | ||
**/lt~obsolete.m4 | ||
**/ltoptions.m4 | ||
**/ltsugar.m4 | ||
**/ltversion.m4 | ||
**/missing | ||
**/compile | ||
**/test-driver | ||
src/config/bitcoin-config.h | ||
src/config/bitcoin-config.h.in | ||
share/setup.nsi | ||
share/qt/Info.plist | ||
|
||
src/univalue/gen | ||
|
||
src/qt/*.moc | ||
src/qt/moc_*.cpp | ||
src/qt/forms/ui_*.h | ||
|
||
src/qt/test/moc*.cpp | ||
|
||
src/tor.timestamp* | ||
|
||
**/.deps | ||
**/.dirstamp | ||
**/.libs | ||
|
||
**/.*.swp | ||
**/*.*~* | ||
**/*.bak | ||
**/*.rej | ||
**/*.orig | ||
**/*.pyc | ||
**/*.o | ||
**/*.o-* | ||
**/*.patch | ||
**/*.a | ||
**/*.pb.cc | ||
**/*.pb.h | ||
|
||
**/*.log | ||
**/*.trs | ||
**/*.dmg | ||
|
||
**/*.json.h | ||
**/*.raw.h | ||
|
||
#libtool object files | ||
**/*.lo | ||
**/*.la | ||
|
||
# Compilation and Qt preprocessor part | ||
**/*.qm | ||
**/Makefile | ||
**/zcoin-qt* | ||
**/Zcoin-Qt.app | ||
|
||
# Unit-tests | ||
**/Makefile.test | ||
**/zcoin-qt_test | ||
|
||
# Resources cpp | ||
**/qrc_*.cpp | ||
|
||
# Mac specific | ||
**/.DS_Store | ||
build | ||
|
||
#lcov | ||
**/*.gcno | ||
**/*.gcda | ||
*.info | ||
test_zcoin.coverage | ||
total.coverage | ||
coverage_percent.txt | ||
|
||
#build tests | ||
linux-coverage-build | ||
linux-build | ||
win32-build | ||
test/config.ini | ||
test/cache/* | ||
src/test/buildenv.py | ||
|
||
!src/leveldb*/Makefile | ||
|
||
doc/doxygen | ||
|
||
libzcoinconsensus.pc | ||
contrib/devtools/split-debug.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# This is a Dockerfile for zcoind. | ||
FROM debian:stretch | ||
|
||
# Install required system packages | ||
RUN apt-get update && apt-get install -y \ | ||
automake \ | ||
bsdmainutils \ | ||
curl \ | ||
g++ \ | ||
libboost-all-dev \ | ||
libevent-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
libzmq3-dev \ | ||
make \ | ||
openjdk-8-jdk \ | ||
pkg-config \ | ||
zlib1g-dev | ||
|
||
# Install Berkeley DB 4.8 | ||
RUN curl -L http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz | tar -xz -C /tmp && \ | ||
cd /tmp/db-4.8.30/build_unix && \ | ||
../dist/configure --enable-cxx --includedir=/usr/include/bdb4.8 --libdir=/usr/lib && \ | ||
make && make install && \ | ||
cd / && rm -rf /tmp/db-4.8.30 | ||
|
||
# Create user to run daemon | ||
RUN useradd -m -U zcoind | ||
|
||
# Build Zcoin | ||
COPY . /tmp/zcoin/ | ||
|
||
RUN cd /tmp/zcoin && \ | ||
./autogen.sh && \ | ||
./configure --without-gui --prefix=/usr && \ | ||
make && \ | ||
make check && \ | ||
make install && \ | ||
cd / && rm -rf /tmp/zcoin | ||
|
||
# Remove unused packages | ||
RUN apt-get remove -y \ | ||
automake \ | ||
bsdmainutils \ | ||
curl \ | ||
g++ \ | ||
libboost-all-dev \ | ||
libevent-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
libzmq3-dev \ | ||
make | ||
|
||
# Start Zcoin Daemon | ||
USER zcoind | ||
|
||
RUN mkdir /home/zcoind/.zcoin | ||
VOLUME [ "/home/zcoind/.zcoin" ] | ||
|
||
EXPOSE 8168 | ||
EXPOSE 8888 | ||
EXPOSE 18444 | ||
|
||
ENTRYPOINT [ "/usr/bin/zcoind" ] |