From 26830b0f0deb185ae41115820ab5dae919462795 Mon Sep 17 00:00:00 2001 From: Le-Caignec Date: Fri, 22 Aug 2025 15:20:48 +0200 Subject: [PATCH 1/6] feat: enhance documentation with new toolkit overview and iApp generator details --- README.md | 1 + src/get-started/toolkit.md | 31 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82e2cd8c..808ed942 100644 --- a/README.md +++ b/README.md @@ -261,3 +261,4 @@ for input parameters: - Improve Guide in build-iapp section - be more clear for builder ( how to process process protectedData, clarify input-output guide) - refactor iapp generator cli reference +- Add illustration in the different pages diff --git a/src/get-started/toolkit.md b/src/get-started/toolkit.md index f802948b..b2ee737a 100644 --- a/src/get-started/toolkit.md +++ b/src/get-started/toolkit.md @@ -5,6 +5,33 @@ description: Essential tools and resources for building on iExec # ๐Ÿ› ๏ธ iExec Toolkit -This page is under development. +Build faster and smarter with our turnkey toolkit designed to streamline your iExec development experience. - +## ๐Ÿš€ iApp Generator + +The **iApp Generator** is your quick-start solution for creating iExec confidential decentralized applications. Generate production-ready iApp with just a few commands, let free your imagination. + +### Key Features + +- **Development templates** that simplify iApp development +- **Streamlined wallet management** for easy app deployment +- **Governance management** to control who accesses your app, when, and at what price + +### Get Started + +Jump right into building with our comprehensive guide: [Building Your iApp โ†’](/references/iapp-generator/building-your-iexec-app.md) + +## ๐Ÿ”’ DataProtector-SDK + +The **DataProtector-SDK** provides a complete toolkit for managing confidential data on iExec. Protect, share, and monetize your data by exposing the protected asset type on the iExec protocol without revealing the actual value, allowing users to pay for access. + +### Key Features + +- **Easy data protection** through SDK methods +- **Asset visualization** to easily view and explore protected asset types on the iExec protocol +- **Content consumption** capabilities for accessing protected data through confidential iExec applications (iApps) +- **Governance management** to control who accesses your data, when, and at what price + +### Get Started + +Learn how to protect and manage your data: [DataProtector Getting Started โ†’](/references/dataProtector/getting-started.md) From 8f2da1a3e15b084d20dc44b5817992f9ee99f709 Mon Sep 17 00:00:00 2001 From: Le-Caignec Date: Fri, 22 Aug 2025 15:35:11 +0200 Subject: [PATCH 2/6] docs: improve formatting and readability in toolkit documentation --- src/get-started/toolkit.md | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/get-started/toolkit.md b/src/get-started/toolkit.md index b2ee737a..7435d657 100644 --- a/src/get-started/toolkit.md +++ b/src/get-started/toolkit.md @@ -5,33 +5,45 @@ description: Essential tools and resources for building on iExec # ๐Ÿ› ๏ธ iExec Toolkit -Build faster and smarter with our turnkey toolkit designed to streamline your iExec development experience. +Build faster and smarter with our turnkey toolkit designed to streamline your +iExec development experience. ## ๐Ÿš€ iApp Generator -The **iApp Generator** is your quick-start solution for creating iExec confidential decentralized applications. Generate production-ready iApp with just a few commands, let free your imagination. +The **iApp Generator** is your quick-start solution for creating iExec +confidential decentralized applications. Generate production-ready iApp with +just a few commands, let free your imagination. ### Key Features - **Development templates** that simplify iApp development - **Streamlined wallet management** for easy app deployment -- **Governance management** to control who accesses your app, when, and at what price +- **Governance management** to control who accesses your app, when, and at what + price ### Get Started -Jump right into building with our comprehensive guide: [Building Your iApp โ†’](/references/iapp-generator/building-your-iexec-app.md) +Jump right into building with our comprehensive guide: +[Building Your iApp โ†’](/references/iapp-generator/building-your-iexec-app.md) ## ๐Ÿ”’ DataProtector-SDK -The **DataProtector-SDK** provides a complete toolkit for managing confidential data on iExec. Protect, share, and monetize your data by exposing the protected asset type on the iExec protocol without revealing the actual value, allowing users to pay for access. +The **DataProtector-SDK** provides a complete toolkit for managing confidential +data on iExec. Protect, share, and monetize your data by exposing the protected +asset type on the iExec protocol without revealing the actual value, allowing +users to pay for access. ### Key Features - **Easy data protection** through SDK methods -- **Asset visualization** to easily view and explore protected asset types on the iExec protocol -- **Content consumption** capabilities for accessing protected data through confidential iExec applications (iApps) -- **Governance management** to control who accesses your data, when, and at what price +- **Asset visualization** to easily view and explore protected asset types on + the iExec protocol +- **Content consumption** capabilities for accessing protected data through + confidential iExec applications (iApps) +- **Governance management** to control who accesses your data, when, and at what + price ### Get Started -Learn how to protect and manage your data: [DataProtector Getting Started โ†’](/references/dataProtector/getting-started.md) +Learn how to protect and manage your data: +[DataProtector Getting Started โ†’](/references/dataProtector/getting-started.md) From 7f4c2df9cffccc5e203ce655a2f2e4e10e0ba854 Mon Sep 17 00:00:00 2001 From: Le-Caignec Date: Fri, 22 Aug 2025 16:42:29 +0200 Subject: [PATCH 3/6] feat: remove 'Build your first application' section from sidebar and delete corresponding guide --- .vitepress/sidebar.ts | 4 - README.md | 8 - .../advanced/build-your-first-iapp.md | 429 ------------------ .../advanced/build-your-first-sgx-iapp.md | 218 ++++++++- .../advanced/build-your-first-tdx-iapp.md | 8 +- src/guides/build-iapp/advanced/quick-start.md | 6 +- 6 files changed, 205 insertions(+), 468 deletions(-) delete mode 100644 src/guides/build-iapp/advanced/build-your-first-iapp.md diff --git a/.vitepress/sidebar.ts b/.vitepress/sidebar.ts index 4f0e1b1e..5657fda4 100644 --- a/.vitepress/sidebar.ts +++ b/.vitepress/sidebar.ts @@ -153,10 +153,6 @@ export function getSidebar() { text: 'Quick Start', link: '/guides/build-iapp/advanced/quick-start', }, - { - text: 'Build your first application', - link: '/guides/build-iapp/advanced/build-your-first-iapp', - }, { text: 'Build your first SGX app', link: '/guides/build-iapp/advanced/build-your-first-sgx-iapp', diff --git a/README.md b/README.md index 808ed942..ebeadc58 100644 --- a/README.md +++ b/README.md @@ -226,11 +226,9 @@ for input parameters: ## TODO -- Adapt hardcoded address to feat with new contracts deployed on arbitrum - Add link to the new explorer feature Asset_Types in the guide => `handle-schemas-dataset-types` - Add link to remix for deploying whitelist -- complete `use-iapp` section - Maybe split input and output in two diff sub section in build your iapp guide - Explorer l'intรฉgration de codeSpace - Add a Development workflow section (1 - ProtectData, 2- ...) @@ -239,26 +237,20 @@ for input parameters: - Update the Dune Dashboard to the final version - Add new section in `iexec-explorer.md` file to talk about: available chain on the UI + SRLC/RLC on account section feature of the protocol -- Update or add design illustrations based on the new design system -- Check how to pay guide to update with the launch on Arbitrum (RLC vs xRLC) - framework AI supportรฉ - check glossary -- migrate github iexec SDK doc here - migrate pay-per-task page into a guide - check pages (introduction & getting-started) for use-iapp guide - Schema what is iexec to do and implement - Give recap of Workerpool address fo chains - Talk about ENS on Bellecour(it's not supported on arbitrum) -- Rework Advanced iApp building guides. (from "old" protocol doc) <<<<<<< HEAD - Talk about encrypting results in use-iapp - Refactor "advanced" section in build-iapp - Rework src\get-started\protocol\iexec-doracle.md (transfer to guide or rewrite) - Talk about encrypting results in use-iapp -- Refactor "advanced" section in build-iapp - Rework src\get-started\protocol\oracle.md (transfer to guide or rewrite) - Talk about iApp secret - Improve Guide in build-iapp section - be more clear for builder ( how to process process protectedData, clarify input-output guide) -- refactor iapp generator cli reference - Add illustration in the different pages diff --git a/src/guides/build-iapp/advanced/build-your-first-iapp.md b/src/guides/build-iapp/advanced/build-your-first-iapp.md deleted file mode 100644 index ced98339..00000000 --- a/src/guides/build-iapp/advanced/build-your-first-iapp.md +++ /dev/null @@ -1,429 +0,0 @@ ---- -title: Build Your First iApp -description: - In this section we will show you how you can create an iApp over the iExec - infrastructure. ---- - -# Build your first iApp - -> In this section we will show you how you can create an iApp (iExec -> confidential application) over the iExec infrastructure. - -::: tip Prerequisites - -- [Docker](https://docs.docker.com/install/) 17.05 or higher on the daemon and - client. -- [Dockerhub](https://hub.docker.com/) account. -- [iExec SDK](https://www.npmjs.com/package/iexec) 8.0.0 or higher. -- [Quickstart](./quick-start.md) tutorial completed - -::: - -In this guide, we will prepare an iExec iApp based on an existing docker image -and we will run it on iExec decentralized infrastructure. - -## Understand what is an iExec decentralized application (iApp)? - -iExec leverage [Docker](https://www.docker.com/why-docker) containers to ensure -the execution of your application on a decentralized infrastructure. iExec -supports Linux-based docker images. - -### Why using Docker containers? - -- Docker Engine is the most **widely used** container engine. -- A Docker container image is a **standard** unit of software that packages up - code and all its dependencies so the application runs quickly and reliably - from one computing environment to another. This allows for computations to be - **run on any worker** connected to the decentralized infrastructure. -- Docker also enables the creation of new layers on top of existing images. This - allows for any iExec **apps to be easily built on top of existing docker - images**. - -### What kind of application can I build on iExec? - -Today you can run any application as a task. This means services are not -supported for now. - -## Build your iApp - -Create the folder tree for your application in `~/iexec-projects/`. - -```bash -cd ~/iexec-projects -mkdir hello-world-iapp -cd hello-world-iapp -mkdir src -touch Dockerfile -``` - -### Write the iApp - -::: warning - -For demo purposes, we omitted some development best practices in these examples. - -Make sure to check your field's best practices before going to production. - -::: - -The following examples only feature Javascript and Python use cases for -simplicity concerns but remember that you can run on iExec anything which is -Dockerizable. - -**Copy the following content** in `src/` . - -::: code-group - -```javascript [src/app.js] -const fsPromises = require('fs').promises; - -(async () => { - try { - const iexecOut = process.env.IEXEC_OUT; - // Do whatever you want (let's write hello world here) - const message = process.argv.length > 2 ? process.argv[2] : 'World'; - - const text = `Hello, ${message}!`; - console.log(text); - // Append some results in /iexec_out/ - await fsPromises.writeFile(`${iexecOut}/result.txt`, text); - // Declare everything is computed - const computedJsonObj = { - 'deterministic-output-path': `${iexecOut}/result.txt`, - }; - await fsPromises.writeFile( - `${iexecOut}/computed.json`, - JSON.stringify(computedJsonObj) - ); - } catch (e) { - console.log(e); - process.exit(1); - } -})(); -``` - -```python [src/app.py] -import os -import sys -import json - -iexec_out = os.environ['IEXEC_OUT'] - -# Do whatever you want (let's write hello world here) -text = 'Hello, {}!'.format(sys.argv[1] if len(sys.argv) > 1 else "World") -print(text) - -# Append some results in /iexec_out/ -with open(iexec_out + '/result.txt', 'w+') as fout: - fout.write(text) - -# Declare everything is computed -with open(iexec_out + '/computed.json', 'w+') as f: - json.dump({ "deterministic-output-path" : iexec_out + '/result.txt' }, f) -``` - -::: - -::: warning - -As a developer, make it a rule to never log sensitive information in your -application. Execution logs are accessible by: - -- worker(s) involved in the task -- the workerpool manager -- the requester of the task - -::: - -### Dockerize your iApp - -**Copy the following content** in `Dockerfile` . - -::: code-group - -```bash [Dockerfile for JavaScript] -FROM node:22-alpine3.21 -### install your dependencies if you have some -RUN mkdir /app && cd /app -COPY ./src /app -ENTRYPOINT [ "node", "/app/app.js"] -``` - -```bash [Dockerfile for Python] -FROM python:3.13.3-alpine3.21 -### install python dependencies if you have some -COPY ./src /app -ENTRYPOINT ["python3", "/app/app.py"] -``` - -::: - -Build the docker image. - -::: warning - -iExec expects your Docker container to be built for the `linux/amd64` platform. -However, if you develop on a **Mac** with Apple **M processor**, the platform is -`linux/arm64`, which is different. To prepare your application, you will need to -install `buildkit` and then prepare your docker image for both platforms. - -```bash -brew install buildkit -# ARM64 variant for local testing only -docker buildx build --platform linux/arm64 --tag /hello-world . -# AMD64 variant to deploy on iExec -docker buildx build --platform linux/amd64 --tag /hello-world . -``` - -::: - -```bash -docker build --tag hello-world . -``` - -::: tip - -`docker build` produce an image id, using `--tag ` option is a convenient -way to name the image to reuse it in the next steps. - -::: - -**Congratulations you built your first docker image for iExec!** - -## Test your iApp locally - -### Basic test - -Create local volumes to simulate input and output directories. - -```bash -mkdir -p ./tmp/iexec_in -mkdir -p ./tmp/iexec_out -``` - -Run your application locally \(container volumes bound with local volumes\). - -```bash -docker run --rm \ - -v ./tmp/iexec_in:/iexec_in \ - -v ./tmp/iexec_out:/iexec_out \ - -e IEXEC_IN=/iexec_in \ - -e IEXEC_OUT=/iexec_out \ - hello-world arg1 arg2 arg3 -``` - -::: tip Docker run \[options\] image \[args\] - -**docker run usage:** - -`docker run [OPTIONS] IMAGE [COMMAND] [ARGS...]` - -Use `[COMMAND]` and `[ARGS...]` to simulate the requester arguments - -**useful options for iExec:** - -`-v` : Bind mount a volume. Use it to bind input and output directories -(`/iexec_in` and `/iexec_out`) - -`-e`: Set environnement variable. Use it to simulate iExec Runtime variables - -::: - -### Test with input files - -Starting with the basic test you can simulate input files. - -For each input file: - -- Copy it in the local volume bound to `/iexec_in` . -- Add `-e IEXEC_INPUT_FILE_NAME_x=NAME` to docker run options \(`x` is the index - of the file starting by 1 and `NAME` is the name of the file\) - -Add `-e IEXEC_INPUT_FILES_NUMBER=n` to docker run options \(`n` is the total -number of input files\). - -Example with two inputs files: - -```bash -touch ./tmp/iexec_in/file1 && \ -touch ./tmp/iexec_in/file2 && \ -docker run \ - -v ./tmp/iexec_in:/iexec_in \ - -v ./tmp/iexec_out:/iexec_out \ - -e IEXEC_IN=/iexec_in \ - -e IEXEC_OUT=/iexec_out \ - -e IEXEC_INPUT_FILE_NAME_1=file1 \ - -e IEXEC_INPUT_FILE_NAME_2=file2 \ - -e IEXEC_INPUT_FILES_NUMBER=2 \ - hello-world \ - arg1 arg2 arg3 -``` - -## Test your iApp on iExec - -### Push your iApp to Dockerhub - -Login to your Dockerhub account. - -```bash -docker login -``` - -Tag your application image to push it to your dockerhub public repository. - -```bash -docker tag hello-world /hello-world:1.0.0 -``` - -::: warning - -replace `` with your docker user name - -::: - -Push the image to Dockerhub. - -```bash -docker push /hello-world:1.0.0 -``` - -**Congratulations, your iApp is ready to be deployed on iExec!** - -### Deploy your iApp on iExec - -You already learned how to deploy the default iApp on iExec in the -[previous tutorial](./quick-start.md). - -Go back to the `iexec-project` folder. - -```bash -cd ~/iexec-projects/ -``` - -You will need a few configurations in `iexec.json` to deploy your iApp: - -- Replace iApp **name** with your application name \(display only\) -- Replace iApp **multiaddr** with your iApp image download URI \(should looks - like `docker.io//hello-world:1.0.0`\) -- Replace iApp **checksum** with your application image checksum \(see tip - below\) - -::: info - -The checksum of your iApp is the sha256 digest of the docker image prefixed with -`0x` , you can use the following command to get it. - -```bash -docker pull /hello-world:1.0.0 | grep "Digest: sha256:" | sed 's/.*sha256:/0x/' -``` - -::: - -Deploy your iApp on iExec - -```bash twoslash -iexec app deploy --chain {{chainName}} -``` - -Verify the deployed iApp \(name, multiaddr, checksum, owner\) - -```bash twoslash -iexec app show --chain {{chainName}} -``` - -### Run your iApp on iExec - -```bash twoslash -iexec app run --chain {{chainName}} --workerpool {{workerpoolAddress}} --watch -``` - -::: info - -**Using arguments:** - -You can pass arguments to the iApp using `--args ` option. - -With `--args "dostuff --with-option"` the iApp will receive -`["dostuff", "--with-option"]` as process args. - -**Using input files:** - -You can pass input files to the iApp using `--input-files ` option. - -With -`--input-files https://example.com/file-A.txt,https://example.com/file-B.zip` -the iExec worker will download the files before running the iApp in `IEXEC_IN`, -and let the iApp access them through variables: - -- `file-A.txt` as`IEXEC_INPUT_FILE_NAME_1` -- `file-B.zip` as`IEXEC_INPUT_FILE_NAME_2` - -::: - -Once the run is completed copy the taskid from `iexec app run` output to -download and check the result - -```bash twoslash -iexec task show --chain {{chainName}} --download my-app-result \ - && unzip my-app-result.zip -d my-app-result -``` - -**Congratulations your iApp successfully ran on iExec!** - -## Manage your iApp's output - -iExec enables running apps producing output files, you will need a place for -storing your apps outputs. - -::: info - -iExec provides a default storage solution based on [IPFS](https://ipfs.io/). -This solution ensures your result to be publicly accessible through a -decentralized network. - -To ensure your business data remains secure and private, iExec offers optional -RSA result encryption and the ability to push results to private storage -providers. For more information, refer to `iexec storage --help` and -the[iExec SDK](https://github.com/iExecBlockchainComputing/iexec-sdk). - -::: - -## Access to iApp and task logs on iExec - -Sometimes things don't work out right the first time and you may need to -[Debug your tasks](/guides/build-iapp/debugging). - -## Publish your iApp on the iExec marketplace - -```bash twoslash -iexec app publish --chain {{chainName}} -``` - -**Congratulations your application is now available on iExec!** - -## What's next? - -In this tutorial you learned about the key concepts for building an iApp on -iExec: - -- iExec iApp inputs and outputs -- iExec iApp must produce a `computed.json` file \(required for the proof of - execution\) -- using docker to package your iApp with all its dependencies -- testing an iExec iApp locally -- publishing on dockerhub - - diff --git a/src/guides/build-iapp/advanced/build-your-first-sgx-iapp.md b/src/guides/build-iapp/advanced/build-your-first-sgx-iapp.md index 2a5b0867..d7aadc63 100644 --- a/src/guides/build-iapp/advanced/build-your-first-sgx-iapp.md +++ b/src/guides/build-iapp/advanced/build-your-first-sgx-iapp.md @@ -10,13 +10,6 @@ description: In this tutorial, you will learn how to build and run a Confidential Computing application with the Scone TEE framework. -::: warning - -Before going any further, make sure you managed to -[Build your first application](./build-your-first-iapp). - -::: - ::: tip Prerequisites: - [Docker](https://docs.docker.com/install/) 17.05 or higher on the daemon and @@ -41,14 +34,6 @@ docker login registry.scontain.com ## Prepare your application -Before going further, your `/hello-world:1.0.0` image built -previously is required. - -If you missed that part, please go back to -[Build your first application](./build-your-first-iapp). - -For this tutorial, you can reuse the same directory tree or create a new one. - To create a new directory tree, execute the following commands in `~/iexec-projects/`. @@ -62,6 +47,201 @@ touch sconify.sh chmod +x sconify.sh ``` +### Write the iApp logic + +The following examples only feature Javascript and Python use cases for +simplicity concerns but remember that you can run on iExec anything which is +Dockerizable. + +**Copy the following content** in `src/` . + +::: code-group + +```javascript [src/app.js] +const fsPromises = require('fs').promises; + +(async () => { + try { + const iexecOut = process.env.IEXEC_OUT; + // Do whatever you want (let's write hello world here) + const message = process.argv.length > 2 ? process.argv[2] : 'World'; + + const text = `Hello, ${message}!`; + console.log(text); + // Append some results in /iexec_out/ + await fsPromises.writeFile(`${iexecOut}/result.txt`, text); + // Declare everything is computed + const computedJsonObj = { + 'deterministic-output-path': `${iexecOut}/result.txt`, + }; + await fsPromises.writeFile( + `${iexecOut}/computed.json`, + JSON.stringify(computedJsonObj) + ); + } catch (e) { + console.log(e); + process.exit(1); + } +})(); +``` + +```python [src/app.py] +import os +import sys +import json + +iexec_out = os.environ['IEXEC_OUT'] + +# Do whatever you want (let's write hello world here) +text = 'Hello, {}!'.format(sys.argv[1] if len(sys.argv) > 1 else "World") +print(text) + +# Append some results in /iexec_out/ +with open(iexec_out + '/result.txt', 'w+') as fout: + fout.write(text) + +# Declare everything is computed +with open(iexec_out + '/computed.json', 'w+') as f: + json.dump({ "deterministic-output-path" : iexec_out + '/result.txt' }, f) +``` + +::: + +::: warning + +As a developer, make it a rule to never log sensitive information in your +application. Execution logs are accessible by: + +- worker(s) involved in the task +- the workerpool manager +- the requester of the task + +::: + +### Dockerize your iApp + +**Copy the following content** in `Dockerfile` . + +::: code-group + +```bash [Dockerfile for JavaScript] +FROM node:22-alpine3.21 +### install your dependencies if you have some +RUN mkdir /app && cd /app +COPY ./src /app +ENTRYPOINT [ "node", "/app/app.js"] +``` + +```bash [Dockerfile for Python] +FROM python:3.13.3-alpine3.21 +### install python dependencies if you have some +COPY ./src /app +ENTRYPOINT ["python3", "/app/app.py"] +``` + +::: + +Build the docker image. + +::: warning + +iExec expects your Docker container to be built for the `linux/amd64` platform. +However, if you develop on a **Mac** with Apple **M processor**, the platform is +`linux/arm64`, which is different. To prepare your application, you will need to +install `buildkit` and then prepare your docker image for both platforms. + +```bash +brew install buildkit +# ARM64 variant for local testing only +docker buildx build --platform linux/arm64 --tag /hello-world . +# AMD64 variant to deploy on iExec +docker buildx build --platform linux/amd64 --tag /hello-world . +``` + +::: + +```bash +docker build --tag hello-world . +``` + +::: tip + +`docker build` produce an image id, using `--tag ` option is a convenient +way to name the image to reuse it in the next steps. + +::: + +**Congratulations you built your first docker image for iExec!** + +## Test your iApp locally + +### Basic test + +Create local volumes to simulate input and output directories. + +```bash +mkdir -p ./tmp/iexec_in +mkdir -p ./tmp/iexec_out +``` + +Run your application locally \(container volumes bound with local volumes\). + +```bash +docker run --rm \ + -v ./tmp/iexec_in:/iexec_in \ + -v ./tmp/iexec_out:/iexec_out \ + -e IEXEC_IN=/iexec_in \ + -e IEXEC_OUT=/iexec_out \ + hello-world arg1 arg2 arg3 +``` + +::: tip Docker run \[options\] image \[args\] + +**docker run usage:** + +`docker run [OPTIONS] IMAGE [COMMAND] [ARGS...]` + +Use `[COMMAND]` and `[ARGS...]` to simulate the requester arguments + +**useful options for iExec:** + +`-v` : Bind mount a volume. Use it to bind input and output directories +(`/iexec_in` and `/iexec_out`) + +`-e`: Set environnement variable. Use it to simulate iExec Runtime variables + +::: + +### Test with input files + +Starting with the basic test you can simulate input files. + +For each input file: + +- Copy it in the local volume bound to `/iexec_in` . +- Add `-e IEXEC_INPUT_FILE_NAME_x=NAME` to docker run options \(`x` is the index + of the file starting by 1 and `NAME` is the name of the file\) + +Add `-e IEXEC_INPUT_FILES_NUMBER=n` to docker run options \(`n` is the total +number of input files\). + +Example with two inputs files: + +```bash +touch ./tmp/iexec_in/file1 && \ +touch ./tmp/iexec_in/file2 && \ +docker run \ + -v ./tmp/iexec_in:/iexec_in \ + -v ./tmp/iexec_out:/iexec_out \ + -e IEXEC_IN=/iexec_in \ + -e IEXEC_OUT=/iexec_out \ + -e IEXEC_INPUT_FILE_NAME_1=file1 \ + -e IEXEC_INPUT_FILE_NAME_2=file2 \ + -e IEXEC_INPUT_FILES_NUMBER=2 \ + hello-world \ + arg1 arg2 arg3 +``` + ## Build the TEE docker image Before wrapping your iExec confidential application with Scone, you need to @@ -85,7 +265,7 @@ We will use the following script to wrap the sconification process, copy the #!/bin/bash # Declare image related variables -IMG_FROM=/hello-world:1.0.0 +IMG_FROM=/hello-world IMG_TO=/tee-scone-hello-world:1.0.0 # Run the sconifier to build the TEE image based on the non-TEE image @@ -113,7 +293,7 @@ docker run -it --rm \ #!/bin/bash # Declare image related variables -IMG_FROM=/hello-world:1.0.0 +IMG_FROM=/hello-world IMG_TO=/tee-scone-hello-world:1.0.0 # Run the sconifier to build the TEE image based on the non-TEE image @@ -148,6 +328,7 @@ Run the `sconify.sh` script to build the Scone TEE application: Push your image on DockerHub: ```bash +docker login docker push /tee-scone-hello-world:1.0.0 ``` @@ -198,9 +379,6 @@ See [Create your identity on the blockchain](./quick-start.md#create-your-identity-on-the-blockchain) to retrieve `` value. -See [Deploy your iApp on iExec](./build-your-first-iapp.md) to retrieve your -image ``. - Run your TEE image with `SCONE_HASH=1` to get the enclave fingerprint (mrenclave): diff --git a/src/guides/build-iapp/advanced/build-your-first-tdx-iapp.md b/src/guides/build-iapp/advanced/build-your-first-tdx-iapp.md index 01270578..3453415b 100644 --- a/src/guides/build-iapp/advanced/build-your-first-tdx-iapp.md +++ b/src/guides/build-iapp/advanced/build-your-first-tdx-iapp.md @@ -64,8 +64,8 @@ need to be changed compared to the usual SGX workflow: `chain.json` and iApps using Intel TDX technology follow the same format as non-TEE applications; follow the instructions on -[Build your first application](./build-your-first-iapp) to create and Dockerize -your iApp. +[Build your first application](./build-your-first-sgx-iapp) to create and +Dockerize your iApp. After this step, the Docker image of your iApp should be published on Docker Hub (e.g. `/hello-world:1.0.0`). @@ -115,8 +115,8 @@ Your `iexec.json` should now look like this example: ::: info -See [Deploy your iApp on iExec](./build-your-first-iapp.md) to retrieve your -image ``. +See [Deploy your iApp on iExec](../deploy-&-run.md) to retrieve your image +``. ::: diff --git a/src/guides/build-iapp/advanced/quick-start.md b/src/guides/build-iapp/advanced/quick-start.md index e31b463b..3b5b0a41 100644 --- a/src/guides/build-iapp/advanced/quick-start.md +++ b/src/guides/build-iapp/advanced/quick-start.md @@ -135,8 +135,8 @@ Given an input string, the application generates an ASCII art greeting. You can deploy this application on iExec, it will run out of the box. When you are confident with iExec concept, you can read -[Your first app](./build-your-first-iapp.md) and learn how to setup your own app -on iExec. +[Your first app](./build-your-first-sgx-iapp.md) and learn how to setup your own +app on iExec. You will now deploy your app on iExec, this will be your first transaction on the blockchain: @@ -348,7 +348,7 @@ You are now familiar with the following key iExec concepts for developers: Continue with these guides: -- [Learn how to build your first application running on iExec](./build-your-first-iapp.md) +- [Learn how to build your first condiential application running on iExec](./build-your-first-sgx-iapp.md)