Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compile daemon and gui version #20

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Contents

All commands below are adopted for Ubuntu, other distributions may need an other command set.

## Build Gui and Daemon via docker
Result stored to save
$cd docker
$./make-bcn.sh

### Building with standard options

To go futher you have to have a number of packages and utilities.
Expand Down
8 changes: 8 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '2'
services:
devbcn:
build:
context: ./docker1
dockerfile: Dockerfile-bcn
volumes:
- './save:/save'
15 changes: 15 additions & 0 deletions docker/docker1/Dockerfile-bcn
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM fedora:27
#Fedora image

#FROM debian:stable
#Debian image

#Fedora setup requirements
RUN dnf -y update && dnf -y install gcc-c++ boost-static boost-devel qt5-devel cmake git lmdb-devel

#Debian setup requirements
#RUN apt-get -y update && apt-get -y install build-essential cmake libboost-all-dev liblmdb-dev git qtbase5-dev

ADD ./src ./src

CMD /src/make-bcn-docker.sh
19 changes: 19 additions & 0 deletions docker/docker1/src/make-bcn-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

git clone https://github.com/bcndev/bytecoin.git
cd bytecoin
git clone https://github.com/LMDB/lmdb.git
mkdir -p build
cd build
cmake ..
time make -j4

cd ../..
git clone https://github.com/bcndev/bytecoin-gui.git
cd bytecoin-gui
mkdir -p build
cd build
cmake ..
time make -j4
cp -v ../../bytecoin/bin/* /save/
cp -v ../bin/* /save/
40 changes: 40 additions & 0 deletions docker/make-bcn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

#If you enabled Selinux, you need this command:
#sudo chcon -Rt svirt_sandbox_file_t save

echo 'Detect docker host system'
if df -h | grep atomic ; then
echo 'Atomic docker host'
export PATH=/usr/local/bin:$PATH
else
echo 'Another docker host'
fi

function build
{
if [ ! -d "save" ]; then
mkdir save
fi

docker-compose build
}

function up
{
docker-compose up
}

function leave
{
echo 'Error compile'
/bin/false
}

function info1
{
echo 'All compiled files at folder save'
ls -la save
}
echo 'Compile bytecoin devel (gui and daemon) with Docker'
build && up && info1 || leave