Coder Social home page Coder Social logo

Support for dev image about docker-sia HOT 2 CLOSED

nebulouslabs avatar nebulouslabs commented on May 27, 2024
Support for dev image

from docker-sia.

Comments (2)

ro-tex avatar ro-tex commented on May 27, 2024

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 execute siad from the PATH it will run the version from the volume
  • from the debug container we can build siac and siad 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.

ro-tex avatar ro-tex commented on May 27, 2024

@kwypchlo your proposal can definitely work. I actually like it more than mine. Let's do that.

from docker-sia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.