-
Notifications
You must be signed in to change notification settings - Fork 649
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
Update docker configuration #376
Conversation
I'm confused about what base I should be using for the PR.. |
Please base on develop. |
this is great, thank you very much for making it. i am going to test it as well. as @pmconrad mentions you need to push to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all - I'd never really used docker until this morning, and with your instruction I finally managed to create my first container. Thanks for that! :-)
Along the way I ran into a few issues:
- The docker-compose on my system is too old for the "version: '3'" in your file. I think you should specify the minimum version required to get a working result. "version 2" did it for me just fine.
- The build failed for me until I removed ".git" from the dockerignore file. .git is needed for finding the git version and timestamp during build. Did you really test that?
- My build ran out of diskspace. It worked after I moved to CMAKE_BUILD_TYPE=Release and instructed make to only build witness_node and cli_wallet.
Like I said, I haven't worked with docker before, and therefore don't know about best practices etc.. I'd expected that the resulting image is optimized for production use, i. e. kept as small as possible. To me, that'd mean installing only the resulting binaries in /bin or something and then getting rid of everything used only for building.
CMake complains that it can't find readline, curses and bzip2 headers. Since cli_wallet is being built you should add at least the readline development files.
Thanks for the review, sorry for the mistakes :P
I chose version 3 because there is features in version 2 that are not supported in version 3 and I wanted to prevent locking an old version of docker but you're probably right.
Nope :/
I wanted to do a size reduction pass but forgot.
I was making the image so I could develop for bitshares but a production image makes a lot more sense for docker. I'll try to make an env file for docker that allow for a dev./prod. toggle with prod. by default.
Will do. |
2c20332
to
1711392
Compare
The image is now 1.12GB instead of the previous 7+GB. |
Did you look at crazybits images? May be production images could be put in a dedicated official repo (forked from the one of crazybits ), and just keep a dev image in this repo. Also it might be interesting to upgrade the Vagrant file to use the same docker "dev" container. |
Thanks @Zapata! |
738da99
to
7ba346b
Compare
Clean an simple solution. Nice! |
7ba346b
to
895c6ed
Compare
I've replaced the code with a development oriented image, that's what I'm using to dev on arch linux.
(if your platform don't support the You access an Ubuntu 16.04 container with all development dependencies installed and an unprivileged user which home is a volume of the repository. The default shell is fish, you can use git, cmake, make and other tools in the container. I also removed the original Dockerfile and put info in the README about docker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bumping pull, please excuse the delay, i am going to be back on this tomorrow as i think we need an updated docker working configuration. looking to merge some of this.
Just to be clear on this .. the purpose of this Dockerfile is to offer a console that has the sources of bitshares and all the required dependencies installed in it? I am asking because I don't even see code that compiles bitshares in this PR. |
closing as @xeroc new docker configurations replace this and no further comment was made by author. |
[EDIT] If you want to use bitshares with docker go here https://github.com/crazybits/docker-compose-files
What changed
docker/
directoryUsage with docker-compose
docker-compose up -d
to build bitshare and start the node in the backgrounddocker-compose down
to stop the nodewitness_node_data_dir/config.ini
, for example set(You might need to bind to 0.0.0.0 if you want to expose your node since knowing the container ip there is not trivial)
docker-compose.yml
, for example:docker-compose up -d
(see compose documentation, you can do a lot of stuff with it)Access the cli wallet
docker-compose exec witness bash
to enter the container./programs/cli_wallet/cli_wallet
Change the data directory location
To change the data directory location on the host you need to modify the
docker-compose.yml
file like soLogs
To see the logs either do
docker-compose logs
while the node is runningor
docker-compose up
without the-d
option to run the nodeUpdate the image
docker-compose build
will recompile bitshares if you updated your repositoryOther
docker build
docker run
)