Good day everyone,
I’ve created a Dockerfile on-top of mysten/sui-tools
to publish a package to devnet.
While I built it for a personal use-case it might be helpful for one or another in the community:
the image is available at: naamitest/sui-publish
.
Once the mysten/sui-tools
are tagged in a stable way (devnet, testnet, …) I can tag my image accordingly.
You have to provide 3 environment variables in order to run a container:
- MNEMONIC: Mnemonic phrase to restore the deployer keypair
- ALGORITHM: keypair algorithm
- ADDRESS: they public address of the deployer key-pair
You’re also required to mount the source-folder to sui
Example:
docker run -e MNEMONIC="${{ secrets.DEPLOYER_MENMONIC_PHRASE }}" -e ALGORITHM=${{ vars.DEPLOYER_ALGORITHM }} -e ADDRESS=${{ vars.DEPLOYER_ADDRESS }} -v ${GITHUB_WORKSPACE}:/sui --rm naamitest/sui-publish:latest
All the Dockerfile does is to install git
and set-up the SUI CLI accordingly:
- sui genesis
- network switch to devnet
- import mnemonic phrase into keytool
- set the imported keypair as the active-address
→ docker-publish/Dockerfile at master · naami-finance/docker-publish · GitHub