{"id":13416461,"url":"https://github.com/duedil-ltd/portainer","last_synced_at":"2025-03-14T23:31:52.945Z","repository":{"id":16159981,"uuid":"18906038","full_name":"duedil-ltd/portainer","owner":"duedil-ltd","description":"Apache Mesos framework for building Docker images on a cluster of machines","archived":false,"fork":false,"pushed_at":"2017-02-28T17:15:49.000Z","size":7795,"stargazers_count":132,"open_issues_count":14,"forks_count":16,"subscribers_count":48,"default_branch":"master","last_synced_at":"2024-07-31T21:56:53.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duedil-ltd.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}},"created_at":"2014-04-18T07:23:59.000Z","updated_at":"2023-06-28T07:25:21.000Z","dependencies_parsed_at":"2022-09-02T15:02:16.522Z","dependency_job_id":null,"html_url":"https://github.com/duedil-ltd/portainer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duedil-ltd%2Fportainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duedil-ltd%2Fportainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duedil-ltd%2Fportainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duedil-ltd%2Fportainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duedil-ltd","download_url":"https://codeload.github.com/duedil-ltd/portainer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663516,"owners_count":20327300,"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-07-30T21:00:59.165Z","updated_at":"2025-03-14T23:31:47.924Z","avatar_url":"https://github.com/duedil-ltd.png","language":"Python","funding_links":[],"categories":["Docker Images","Dev Tools","Frameworks"],"sub_categories":["Builder","Experimental/Example/Unsorted"],"readme":"\n# Portainer\n\nPortainer is an [Apache Mesos](https://mesos.apache.org) framework that enables you to build docker images across a cluster of many machines.\n\n```\n                   .,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.\n                   ,                          .,\n                  `,                          ,.\n                  ,`                          .,     _        _\n               ``.,                 _ __   ___,._ __| |_ __ _(_)_ __   ___ _ __\n           `. ``.,.`..             | '_ \\ / _ \\| '__| __/ _` | | '_ \\ / _ \\ '__|\n   .`.```  ...``..`   ```` `.`     | |_) | (_) | |  | || (_| | | | | |  __/ |\n ...........,`.`............,      | .__/ \\___/|_|   \\__\\__,_|_|_| |_|\\___|_|\n           ,  `  .```.````.`,      |_| ,.,.,.,.,.,.,.,,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,\n           ,   , `                     ,              ,              ,              ,\n           , .`` `                     ,              ,              ,              ,\n           , .   `                     ,.,.,.,.,.,.,.,,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,\n           , .   `                     ,              ,              ,              ,\n           , .   `                     ,              ,              ,              ,\n     .`.,,,,,,,,,..                    ``````````````````````````````````````````````\n           `     ,\n           ```````\n```\n\nWhen building docker images at scale, it can be time consuming and wasteful to manage dedicated infrastructure for building and pushing images. Building large containers with many sources and dependencies is a heavy operation, sometimes requiring many large machines. Deploying this infrastructure can be expensive and often leads to poor utilization.\n\nGiven an existing Apache Mesos cluster, Portainer can get to work right away. If you're new to Mesos, you can try out the Vagrant box provided, or learn more about the [Apache Mesos Architecture](https://mesos.apache.org/documentation/latest/mesos-architecture/) and [get started](https://mesos.apache.org/gettingstarted/).\n\nSee below for more documentation on how to use the Vagrant virtual machine.\n\n--------------------------------------------------------------------------------\n\n## Features\n\n- Works out of the box with existing `Dockerfile` files\n- Configurable CPU/Memory resource limits for build tasks\n- Full support for all `Dockerfile` commands, including local sources (e.g `ADD ./src`)\n- Docker build logs are streamed from the Mesos agent for easy debugging and monitoring\n- Support for the `.dockerignore` file\n\n#### Notes\n\n- Pushing built images to the public docker index is currently not supported\n- Support for docker client ~\u003e1.7.0 requires Apache Mesos \u003e=0.23.0 ([MESOS-3279](https://issues.apache.org/jira/browse/MESOS-3279))\n\n--------------------------------------------------------------------------------\n\n## The Basics\n\n### Dependencies\n\nYou'll need to have the following dependencies installed to run the framework.\n\n- Python 2.7\n- Python `virtualenv` and `pip`\n- Protocol Buffers (`brew install protobuf`)\n- Make\n\n### Mesos Agent Dependencies\n\nBy default, Portainer will try and launch an ephemeral docker daemon (`docker -d`) on the mesos agent machine using [docker in docker](https://github.com/jpetazzo/dind). This requires that you're using a Docker Containerizer on your Mesos agents. If you are not, you'll need to specify the `--docker-host` argument (e.g `--docker-host /var/run/docker.sock`) describing where the docker daemon can be accessed on each agent.\n\n## Building an Image\n\n#### 1. Build/Upload the Executor\n\n```\n$ bin/build-executor\n```\n\n_Note: If you've got a dirty git tree, you'll need to set the `FORCE=1` environment variable._\n\nThe built PEX (python executable) archive will be dumped into `./dist`, and needs to be uploaded somewhere Mesos can reach it (HDFS, S3, FTP, HTTP etc). Check the output from the build-executor command to see the file name, and upload the file.\n\nThe environment name is tacked on to the archive filename, e.g. `dist/portainer-37cc6d5eb334473fdaa9c7522c4ce585032dca5c.linux-x86_64.tar.gz`. Make sure you build the executor on the same platform as your mesos slaves use.\n\nIn future, readily-downloadable prebuild pex files will be available on versioned github releases.\n\n#### 2. Grab a `Dockerfile`\n\nPortainer can work out of the box on any existing `Dockerfile`. A few simple examples can be found in the `example/` directory, or you can build an image of the Portainer framework itself using the one at the root of this project directory.\n\n#### 3. Local sources\n\nIf your `Dockerfile` does not include any local sources in the image (via `ADD` or `COPY`) you can skip this step.\n\nSince Portainer will build your image on a remote machine, it must bundle and upload these local sources so they to be used remotely. Portainer uses a staging filesystem that can be accessed both by the framework and by the slave, this can be anything supported by the Mesos Fetcher (e.g HDFS).\n\nUse the `--staging-uri` command line flag to specify this. For example to distribute sources using your HDFS cluster, `--staging-uri=hdfs://my.namenode/tmp/portainer`.\n\n#### 4. Invoke Portainer\n\nGiven Portainer is an Apache Mesos framework, we need to define the resources we'd like to use to build our image. The CPU and RAM limits can be specified using the `--build-cpu` and `--build-mem` command line options. We also need to give our image a name (the repository), a tag and specify a registry to push to.\n\nIf you'd like to see the STDOUT/STDERR logs from your build printed live, add `--stream` to the list of arguments.\n\n```\n$ cd portainer\n$ ./bin/portainer \\\n        --mesos-master \"localhost:5050\" \\\n        --executor-uri \"hdfs://my-namenode/path/to/portainer-executor.tar.gz\" \\\n        build \\\n        --staging-uri \"hdfs://my-namenode/tmp/portainer\" \\\n        --tag \"latest\" \\\n        --to \"my-registry:5000\" \\\n        --build-cpu 1 \\\n        --build-mem 256 \\\n        ./Dockerfile\n```\n\n## Vagrant Example\n\nThe vagrant virtual environment provided will launch a VM will the following components for testing out Portainer;\n\n- Mesos Master + Agent + ZooKeeper\n- Docker Registry\n- Mesos \u003c\u003e Docker Containerizer\n- Portainer code\n\n### 1. Start the VM\n\nTo use the Vagrant box, run `vagrant box add debian-73-x64-virtualbox-nocm http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box` then `vagrant up` to set everything up.\n\n### 2. Test Mesos\n\nThe VM runs on a static IP `192.168.33.50` so before proceeding it's best to check that the Mesos UI is fully up and running at http://192.168.33.50:5050/ and there's a slave joined with at least 256MB of RAM. You should also check that the docker registry is up, a simple `docker ps` should demonstrate this.\n\n### 3. Build the executor\n\nTo build the Portainer executor, simply run `bin/build-executor`.\n\n_Note: If you've got a dirty git tree, you'll need to set the `FORCE=1` environment variable._\n\n### 4. Example build\n\nYou'll need to fill in a few blanks in the follow command line invocation, but this should start a simple build on the local mesos cluster, and push the image to the local repository.\n\n```\n$ bin/portainer \\\n    --mesos-master 192.168.33.50:5050 \\\n    build \\\n    --staging-uri /tmp \\\n    --executor-uri `pwd`/dist/portainer-{CHANGE THIS TO THE ACTUAL FILE}.tar.gz \\\n    --to 192.168.33.50:5000 \\\n    --build-cpu 0.1 \\\n    --build-mem 256 \\\n    --repository tarnfeld/portainer \\\n    --tag latest \\\n    --stream \\\n    ./Dockerfile\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduedil-ltd%2Fportainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduedil-ltd%2Fportainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduedil-ltd%2Fportainer/lists"}