{"id":22220876,"url":"https://github.com/nokia/corteca-toolchain","last_synced_at":"2025-07-27T16:30:33.058Z","repository":{"id":229797540,"uuid":"774971865","full_name":"nokia/corteca-toolchain","owner":"nokia","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-17T18:33:33.000Z","size":375,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-17T19:43:57.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nokia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-20T14:33:36.000Z","updated_at":"2024-04-03T18:29:28.000Z","dependencies_parsed_at":"2024-03-26T10:28:24.405Z","dependency_job_id":"a706a744-87ae-49a7-8d43-17d2a7c97700","html_url":"https://github.com/nokia/corteca-toolchain","commit_stats":null,"previous_names":["nokia/corteca-toolchain"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fcorteca-toolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fcorteca-toolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fcorteca-toolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fcorteca-toolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nokia","download_url":"https://codeload.github.com/nokia/corteca-toolchain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227817162,"owners_count":17824199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T23:10:43.576Z","updated_at":"2024-12-02T23:10:45.207Z","avatar_url":"https://github.com/nokia.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Base image for Corteca Toolchain\n\nPart of Corteca Developer Toolkit, Toolchain is a set of compilation tools that help isolate the application within the container, avoiding interaction with the host system's libraries in the creation of applications for [Corteca Marketplace](https://www.nokia.com/networks/fixed-networks/corteca-applications/). This repository is hosted on [https://github.com/nokia/corteca-toolchain](https://github.com/nokia/corteca-toolchain)\n\n## Clone the repository\n\n### Clone with submodules\n\n```bash\ngit clone --recurse-submodules https://github.com/nokia/corteca-toolchain.git\n```\n\n### Add submodules after cloning\n\nIn case you have previously cloned the repository without `--recurse-submodules` you can do:\n\n```bash\ngit submodule update --init --recursive\n```\n\n## Repo layout\n\n```shell\n├── Documentation       # Documentation\n├──.VERSION             # Toolchain image version\n├── Jenkinsfile         # Pipeline\n├── README.md           # This file\n└── Dockerfile          # Toolchain image Dockerfile\n```\n\n## Build toolchain\n\n### Prerequisites\n\nThe toolchain image is a multi-platform image, this means that a single image is created and depending on the running platform docker only pulls the layers for the specific architecture.\nTo enable multi-platform image build we need to change the storage driver and enable docker to run images for different CPU architectures.\n\n#### Storage drivers\n\nIn order to be able to build multi-platform images you need to change the storage driver of docker. The easiest way to do it is to use the [`containerd image store`](https://docs.docker.com/storage/containerd/)\n\ncreate file `/etc/docker/daemon.json` with the following contents and restart docker daemon\n\n```text\n{\n  \"features\": {\n    \"containerd-snapshotter\": true\n  }\n}\n```\n\n#### Execution of different multi-architecture\n\nSince we build the image for multiple platforms we need to support the execution of different platforms, we also need that in order to run arm64 containers on intel/amd 64bit CPUs.\n\nFor this we need enable execution of different multi-architecture containers by QEMU and binfmt_misc. For more information, see [qemu-user-static](https://github.com/multiarch/qemu-user-static).\n\n```shell\ndocker run --rm --privileged multiarch/qemu-user-static --reset -p yes\n```\n\n### Build a multi-platform base image\n\nCurrently we build an image for amd64, arm32 and arm64.\n\n```shell\ndocker buildx build \\\n    --platform linux/amd64,linux/arm64,linux/arm/v7 \\\n    -t ghcr.io/nokia/corteca-toolchain:$(cat .VERSION) \\\n    -t ghcr.io/nokia/corteca-toolchain \\\n    - \u003c Dockerfile\n```\n\n### Test the images\n\nWe can test that our image supports multiple platforms and test each one of those\n\n#### Arm v8 (64bits)\n\n```shell\ndocker run --rm -it --platform linux/arm64 ghcr.io/nokia/corteca-toolchain uname -m\n```\n\nexpected output:\n\n```text\naarch64\n```\n\n#### Arm v7 (32bits)\n\n```shell\ndocker run --rm -it --platform linux/arm/v7 ghcr.io/nokia/corteca-toolchain uname -m\n```\n\nexpected output:\n\n```text\narmv7l\n```\n\n#### Amd64 (64bits)\n\n```shell\ndocker run --rm -it --platform linux/amd64 ghcr.io/nokia/corteca-toolchain uname -m\n```\n\nexpected output:\n\n```text\nx86_64\n```\n\n### Run a container\n\nYou can create a running container e.g. for arm64:\n\n```shell\ndocker run --rm -it --platform linux/arm64 ghcr.io/nokia/corteca-toolchain\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Fcorteca-toolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnokia%2Fcorteca-toolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Fcorteca-toolchain/lists"}