{"id":20043436,"url":"https://github.com/trinketer22/func_docker","last_synced_at":"2025-03-02T07:22:51.042Z","repository":{"id":63088926,"uuid":"526519008","full_name":"Trinketer22/func_docker","owner":"Trinketer22","description":"Dockerfile for testing FunC code with toncli","archived":false,"fork":false,"pushed_at":"2023-08-28T09:05:33.000Z","size":46,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-12T19:44:59.860Z","etag":null,"topics":["func","toncli"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Trinketer22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2022-08-19T08:11:35.000Z","updated_at":"2024-11-25T18:37:26.000Z","dependencies_parsed_at":"2025-01-12T19:43:36.519Z","dependency_job_id":"1c02dfe5-5404-4758-ae3d-ea24a560018a","html_url":"https://github.com/Trinketer22/func_docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinketer22%2Ffunc_docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinketer22%2Ffunc_docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinketer22%2Ffunc_docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trinketer22%2Ffunc_docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trinketer22","download_url":"https://codeload.github.com/Trinketer22/func_docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241471954,"owners_count":19968305,"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":["func","toncli"],"created_at":"2024-11-13T10:56:16.557Z","updated_at":"2025-03-02T07:22:51.013Z","avatar_url":"https://github.com/Trinketer22.png","language":"Dockerfile","readme":"﻿# Dockerfile for FunC testing\n\nThis docker image should come in handy to run [toncli](https://github.com/disintar/toncli) with the [new tests support](https://github.com/disintar/toncli/blob/master/docs/advanced/func_tests_new.md).  \nSetting it all up manually could be cumbersome otherwise.  \nInspired by [Dockerfile for the Open Network Node](https://github.com/ton-blockchain/ton/tree/master/docker).  \nBuilt on Ubuntu 20.04 so should be WSL docker compatible.\n\n## Pre-built images\n\nPre-built images availabe. \nMult-arch supported *x86_64 (amd64)* and *arm64/v8* **(M1 compatible!)**.  \n[https://hub.docker.com/r/trinketer22/func_docker/](https://hub.docker.com/r/trinketer22/func_docker/)  \n\n-   main is the image from master(this) branch.\n-   slim is extremely small image (\u003c 50MB compressed) from slim branch.\n\n### Install pre-built images\n\nRun:`docker pull trinketer22/func_docker` to install main image.  \nor  \nRun `docker pull trinketer22/func_docker:slim` to install slim image.  \n\nRun `docker tag trinketer22/func_docker toncli-local` to give an alias `toncli-local` for the image `trinketer22/func_docker`.\n\nThen you may go straight to [Usage](#use).\n\n## Build\n\n To build an image run: `docker build . -t toncli-local [ optional --build-arg ]`  \n Where *toncli-local* would be an image name.\n \n In most cases that's it. \n However, if you need something special, there are custom build arguments available.\n \n ### Custom build arguments\n-   **TON_GIT** specifies git repo url to fetch sources from. [SpyCheese](https://github.com/SpyCheese/ton) by default.\n-   **TON_BRANCH** specifies git branch to fetch from. **Set to toncli-local by default** so would likely require change if alternate *TON_GIT* is set.\n-   **BUILD_DEBUG** is self-explaintatory. By default *Release* binaries are built. Set *BUILD_DEBUG=1* to build debug binaries.\n-   **CUSTOM_CMAKE** Overrides build process cmake flags. Use it at your own risk. \n\t\nExample of building debug binaries from [ton-blockchain/ton](https://github.com/ton-blockchain/ton) testnet branch\n\n```console\ndocker build . -t toncli-local \\\n--build-arg TON_GIT=https://github.com/ton-blockchain/ton \\\n--build-arg TON_BRANCH=testnet \\\n--build-arg BUILD_DEBUG=1\n```\n\n\n\n## Use\n\n You're going to need to pass your workdir as a volume to make things happen\n\n### Creating project\n Run  \n \n ``` console\n docker run --rm -it \\\n -v ~/Dev:/code \\\n toncli-local start --name test_project wallet \n ```\n \n You're going to see the toncli project structure in *~/Dev/test_project*  \n `README.md  build  fift  func  project.yaml  tests`\n  \n ### Building\n \n  Run  \n  \n  ``` console\n  docker run --rm -it \\\n  -v ~/Dev/test_project:/code \\\n  toncli-local build\n  ```\n\t\n ### Running tests\n   \n   ``` console\n   docker run --rm -it \\\n   -v ~/Dev/test_project:/code \\\n   toncli-local run_tests\n   ``` \n\n ### Deploying contract\n   Now here is the tricky part.  \n   **Toncli** stores deployment info in it's config directory instead of your project directory.  \n   So we're going to have to create another volume for that to persist.  \n   \n  Run\n  ``` console\n  docker run --rm -it \\\n  -v ~/Dev/test_project:/code \\\n  -v /path/to/toncli_conf_dir/:/root/.config \\\n  toncli-local update_libs\n  ```\n  After that you should go through standard toncli initialization dialog and pass absolute paths to the binaries\n-   /usr/local/bin/func\n-   /usr/local/bin/fift\n-   /usr/local/bin/lite-client\n  \n  Don't get confused those path's are inside the docker image and not your local system.  \n  After that you should get an initialized toncli directory on your local system at */path/to/toncli_conf_dir/toncli*.  \n  Looking like:\n  \n  ``` console\n  config.ini\n  fift-libs\n  func-libs\n  test-libs\n  ``` \n  \n  Now you can use it in the deploy or any other process like so.  \n  \n  Run  \n  \n  ``` console\n  docker run --rm -it \\\n  -v /path/to/project:/code \\\n  -v /path/to/toncli_conf_dir/:/root/.config \\\n  toncli-local deploy --net testnet\n  ```\n  \n  **wallet** directory would be created inside your local config dir with all the usefull deployment information\n### General usage\n ``` console\n docker run --rm -it \\\n -v \u003ccode_volume\u003e \\\n -v [optional config volume] \\\n \u003cdocker image name\u003e \\\n \u003ctoncli command you want to run\u003e\n ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinketer22%2Ffunc_docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrinketer22%2Ffunc_docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinketer22%2Ffunc_docker/lists"}