Comments (6)
That would be awesome!
from scorex.
Ok, trying to get in. Faced some issues, since there is compilation step (unlike python where you just push the sources inside the container and define entry point). But despite the issues was able to build image and run it. Unfortunately it's not usable yet in this form, need to integrate it with SBT to:
- automatically pull in dependencies and the correct path/name of target jars
- ensure build dependencies match dev. runtime environment. (i used sbt 0.13.8 in image while project required 0.13.9 so when i run container it started to download sbt again)
Also the image size is a bit too large - 800+mb and it takes time to build.
I'll try to do the following:
- pick SBT plugin: https://github.com/marcuslonnberg/sbt-docker or http://www.scala-sbt.org/sbt-native-packager/formats/docker.html
- build as small docker image as possible with Java environment to run compiled scorex.jar (i guess it's enough?)
- - use SBT to generate Docker configs and images
- - add
docker
task to build image from sbt console
from scorex.
Guess i found nice solution for smaller image with java:
https://developer.atlassian.com/blog/2015/08/minimal-java-docker-containers/
guys suffered same problem:
Official Java images have historically been mastodontic - cue picture above - I just tried "docker pull java" and I got an image of 816.4MB.
and they was able to reduce the size of image:
fully functional Oracle Java 8 image weighing only 173Mb.
Few questions:
- can Scorex run under OpenJDK or OracleJDK is required?
- Which Java to pick 7 or 8?
And here is how to do the rest using sbt-docker:
https://velvia.github.io/Docker-Scala-Sbt/
from scorex.
And as far as i see data is persistent between sessions, correct?
https://github.com/ConsensusResearch/Scorex-Lagonaki/blob/master/settings.json
"datadir" : "/tmp/data",
Is so it's required to expose /tmp folder to the docker container.
from scorex.
#22 pull request
from scorex.
merged
from scorex.
Related Issues (20)
- Block height in http api
- Reduce number of dependencies in 1.3.0
- http api header fields format
- Why don't you remove Swagger assets from repository?
- Tx with sender=recipient shows twice in api result HOT 2
- This scorex support qora-like pos? HOT 1
- Invalid block processing
- api method for transaction info ? HOT 3
- preferable JSON style HOT 2
- Protected API calls
- StackOverflow for incorrect settings.json HOT 2
- Migrate to akka-http
- Genesis block timestamp
- Scorex version HOT 3
- Swagger UI doesn't work correctly after upgrade to akka-http HOT 2
- Add wiki Docs
- Release automation
- Different Tx type representation as bytes array HOT 1
- NullPointerException during Handshake construction
- Fuzzing tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scorex.