Comments (2)
So, we need a second container, alongside the main production container that the portal is going to be using. This second container should have the dev tools needed to build siad
and the source code. This part is easy and straightforward.
The debug container should be able to build siac
and siad
binaries which, crucially, should be used by the main production container after it's restarted. No problem there but there are some considerations.
The way to do it:
- create a new dir on the server and mount it as a volume on both the production and debug containers
- add this volume to the PATH of the production container before
/usr/bin
, so when the container is restarted and tries to executesiad
from the PATH it will run the version from the volume - from the debug container we can build
siac
andsiad
and copy them to the volume and then restart the production container
Considerations:
- the production container will be blindly running a binary that's provided to it via a volume and this is a security consideration. I'm not sure how severe that is because anyone who can place a binary there should also be able to control docker.
- the process is quite clunky and doesn't allow the developer to locally test the binary before sending it to the production container, unless we keep a second copy of the consensus to be used from the debug container.
- if we use a second copy of the consensus, maybe we can copy the consensus mounted on the production image, strip all wallet-related data and reinitialize it for the new node. I could need some guidance here in order to not miss anything.
from docker-sia.
@kwypchlo your proposal can definitely work. I actually like it more than mine. Let's do that.
from docker-sia.
Related Issues (20)
- Support more architectures HOT 7
- Option flags to siad
- Add a SiaStream image HOT 2
- Capture siad's logs HOT 3
- Container crashes HOT 2
- siad becomes unreachable if socat dies HOT 3
- Explicitly set the maximum allowed number of open file descriptors HOT 2
- Image doesn't allow environment variables to be passed HOT 2
- SIA_WALLET_PASSWORD via docker secret HOT 1
- Dockerfile doesn't upgrade to latest version 1.5.1 HOT 1
- Error while building docker image HOT 2
- Possibility to have the consensus in another volume HOT 2
- Ensure a graceful shutdown of the containers
- Siad has exited unexpectedly. Error Log HOT 1
- Switch from shell to exec `ENTRYPOINT`
- Error Running Docker
- Sia docker daemon error: | could not unmarshal hash: encoding/hex: invalid byte: U+0060 '`'
- Server is unable to create the Sia node HOT 2
- Utilise the upcoming SIAD_DATA_DIR env var HOT 4
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 docker-sia.