diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..b0f1b829 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +# +# Dockerfile for building Twister peer-to-peer micro-blogging +# + +FROM debian:testing +MAINTAINER Álvaro Justen + +ENV DEBIAN_FRONTEND noninteractive + +# Update repositories +RUN echo 'deb http://http.debian.net/debian testing main contrib' > /etc/apt/sources.list +RUN echo 'deb http://http.debian.net/debian testing-updates main contrib' >> /etc/apt/sources.list +RUN echo 'deb http://security.debian.org testing/updates main contrib' >> /etc/apt/sources.list +RUN apt-get update + +# Install needed packages to build and run twisterd +RUN apt-get -y install \ + git autoconf libtool build-essential \ + libboost-all-dev libdb++-dev libminiupnpc-dev libssl-dev + +# Clean APT cache to save disk space +RUN apt-get clean + +# Download and build twister +RUN mkdir /root/.twister +RUN git clone https://github.com/miguelfreitas/twister-core.git /root/twister-core +RUN git clone https://github.com/miguelfreitas/twister-html.git /root/.twister/html +RUN cd /root/twister-core && ./bootstrap.sh +RUN cd /root/twister-core && make + +EXPOSE 28332 +ENTRYPOINT ["/root/twister-core/twisterd"] +CMD ["-rpcuser=user", "-rpcpassword=pwd", "-rpcallowip=*", \ + "-datadir=/root/.twister", "-htmldir=/root/.twister/html"] diff --git a/README.md b/README.md index eabba547..37a6c1d1 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ -twister - p2p microblogging -=========================== +# twister - p2p microblogging -Bitcoin Copyright (c) 2009-2013 Bitcoin Developers -libtorrent Copyright (c) 2003 - 2007, Arvid Norberg -twister Copyright (c) 2013 Miguel Freitas +Bitcoin Copyright (c) 2009-2013 Bitcoin Developers +libtorrent Copyright (c) 2003 - 2007, Arvid Norberg +twister Copyright (c) 2013 Miguel Freitas -What is twister? ----------------- +## What is twister? twister is an experimental peer-to-peer microblogging software. @@ -21,20 +19,25 @@ are provided by libtorrent. Both Bitcoin and libtorrent versions included here are highly patched and do not interoperate with existing networks (on purpose). -Compiling ----------------- -You can build twister using these docs: +## Compiling -[Ubuntu/Debian](https://github.com/miguelfreitas/twister-core/blob/master/doc/building-on-ubuntu-debian.md) +Please follow the instructions for your platform: -[Mac OS X](https://github.com/miguelfreitas/twister-core/blob/master/doc/build-osx.md) +- [UNIX](https://github.com/miguelfreitas/twister-core/blob/master/doc/build-unix.md) +- [Debian/Ubuntu](https://github.com/miguelfreitas/twister-core/blob/master/doc/building-on-ubuntu-debian.md) +- [Mac OS X](https://github.com/miguelfreitas/twister-core/blob/master/doc/build-osx.md) +- [Windows (untested)](https://github.com/miguelfreitas/twister-core/wiki/Compiling-for-Windows) -[Windows (untested)](https://github.com/miguelfreitas/twister-core/wiki/Compiling-for-Windows) +Or, alternatively, you can build Twister on an isolated Linux container, using +[docker](http://docker.io/): -[Unix](https://github.com/miguelfreitas/twister-core/blob/master/doc/build-unix.md) + docker build -t twister https://github.com/miguelfreitas/twister-core/blob/master/Dockerfile + docker run -d -p 127.0.0.1:1234:28332 twister + # now try to access http://127.0.0.1:1234/ on docker host -License -------- +> According to our tests, at least 1GB of RAM is neede to compile Twister. + +## License Bitcoin is released under the terms of the MIT license. See `COPYING` for more information or see http://opensource.org/licenses/MIT. @@ -44,8 +47,7 @@ libtorrent is released under the BSD-license. twister specific code is released under the MIT license or BSD, you choose. (it shouldn't matter anyway, except for the "non-endorsement clause"). -Development process -------------------- +## Development process There is no development process defined yet. @@ -53,8 +55,7 @@ Developers of either bitcoin or libtorrent are welcomed and will be granted immediate write-access to the repository (a small retribution for bastardizing their codebases). -Testing -------- +## Testing Some security checks are disabled (temporarily) allowing multiple clients per IP. Therefore it is possible to run multiple twisterd instances at the same machine: @@ -66,11 +67,10 @@ Therefore it is possible to run multiple twisterd instances at the same machine: Note: some features (like block generation and dht put/get) do now work unless the network has at least two nodes, like these two instances in the example above. -Wire protocol -------------- +## Wire protocol Bitcoin and libtorrent protocol signatures have been changed on purpose to -make twister network incompatible. This avoids the so called +make twister network incompatible. This avoids the so called ["merge bug"](http://blog.notdot.net/2008/6/Nearly-all-DHT-implementations-vulnerable-to-merge-bug). - Bitcoin signature changed from "f9 be b4 d9" to "f0 da bb d2". @@ -79,8 +79,7 @@ make twister network incompatible. This avoids the so called - Torrent/DHT query changed from "y" to "z" - Torrent/DHT answer changed from "a" to "x" -Quick JSON command examples ---------------------------- +## Quick JSON command examples In order to use JSON-RPC you must set user/password/port by either command line or configuration file. This is the same as in [bitcoin](https://en.bitcoin.it/wiki/Running_Bitcoin) @@ -157,8 +156,7 @@ To obtain the full list of commands ./twisterd help -Running the web interface -------------------------- +## Running the web interface First you'll need to grab the latest version of the web UI code and put it in your twister data dir: @@ -176,8 +174,7 @@ Visit [http://localhost:28332/index.html](http://localhost:28332/index.html) in your web browser and you should see a page asking you to choose between the Desktop and Mobile interfaces. -Different themes -------------------------- +## Different themes If you prefer new modern look of twister with new untested things, you can try twister-calm theme But be careful, it is in beta stage.