{"id":14986176,"url":"https://github.com/ferranvila/dockgrant","last_synced_at":"2025-04-11T21:31:14.085Z","repository":{"id":57214096,"uuid":"52954501","full_name":"ferranvila/dockgrant","owner":"ferranvila","description":"Run vagrant commands like docker ","archived":false,"fork":false,"pushed_at":"2020-06-01T04:58:49.000Z","size":126,"stargazers_count":9,"open_issues_count":15,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T16:50:58.931Z","etag":null,"topics":["cli","docker","dockgrant","nodejs","vagrant"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferranvila.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-02T10:30:26.000Z","updated_at":"2023-11-19T21:10:32.000Z","dependencies_parsed_at":"2022-08-26T13:31:02.021Z","dependency_job_id":null,"html_url":"https://github.com/ferranvila/dockgrant","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferranvila%2Fdockgrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferranvila%2Fdockgrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferranvila%2Fdockgrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferranvila%2Fdockgrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferranvila","download_url":"https://codeload.github.com/ferranvila/dockgrant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248442500,"owners_count":21104197,"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":["cli","docker","dockgrant","nodejs","vagrant"],"created_at":"2024-09-24T14:12:29.140Z","updated_at":"2025-04-11T21:31:13.628Z","avatar_url":"https://github.com/ferranvila.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dockgrant\n\n[![Travis branch](https://img.shields.io/travis/ferranvila/dockgrant/master.svg)](https://travis-ci.org/ferranvila/dockgrant) \n[![Npm version](http://img.shields.io/npm/v/dockgrant.svg)](https://www.npmjs.com/package/dockgrant) \n[![Code Climate](https://img.shields.io/codeclimate/github/ferranvila/dockgrant.svg)](https://codeclimate.com/github/ferranvila/dockgrant) \n[![Codacy Badge](https://api.codacy.com/project/badge/grade/73f89de1c45e4eee8cea025cde851bb7)](https://www.codacy.com/app/fnva/dockgrant) \n[![Inline docs](http://inch-ci.org/github/ferranvila/dockgrant.svg?branch=master)](http://inch-ci.org/github/ferranvila/dockgrant)\n[![Greenkeeper badge](https://badges.greenkeeper.io/ferranvila/dockgrant.svg)](https://greenkeeper.io/)\n\n\u003e Run vagrant commands like docker syntax\n\nJust for fun! Or not... I created a command line tool to run [vagrant](https://www.vagrantup.com/) commands like the [docker](https://www.docker.com/) syntax. Maybe you could find this stupid... But I have done [Because I can](https://github.com/krzyzanowskim/CryptoSwift#why)!!! :P\n\n## Pre-requisites\n\n- Vagrant https://www.vagrantup.com/\n- Vagrant exec plugin https://github.com/p0deje/vagrant-exec\n- Vagrant cachier plugin https://github.com/fgrehm/vagrant-cachier\n- VirtualBox https://www.virtualbox.org/\n\n## Getting Started\n\nInstall this globally and you'll have access to the dockgrant command anywhere on your system.\n\n```shell\nnpm install -g dockgrant\n```\n\n## Examples\n\n```shell\ndockgrant run --rm --image hashicorp/precise64 --script \"uname -a\"\n```\nwill output `Linux precise64 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux`\n\n```shell\nvf=/tmp/dockgrant-sample \u0026\u0026\\\nmkdir -p ${vf}/data \u0026\u0026\\\necho \"echo hello \\$VAR\" \u003e ${vf}/data/script.sh \u0026\u0026\\\nchmod +x ${vf}/data/script.sh  \u0026\u0026\\\ndockgrant run --rm --path ${vf} --volume ${vf}/data:/data --workdir /data -e VAR=world --image hashicorp/precise64 --script \"sh script.sh\"\n```\nwill output `hello world`\n\n### Network Collision\n\nIf you're seeing this error when you're running the command is because the default vagrant network ```192.168.1.0``` is configured into your network card and collides with the vagrant private network:\n\n```script\nThe specified host network collides with a non-hostonly network!\nThis will cause your specified IP to be inaccessible. Please change\nthe IP or name of your host only network so that it no longer matches that of\na bridged or non-hostonly network.\n```\n\nYou can define a new private network editing the config file of the program in: ```${HOME}/.dockgrant/app.js```\n\n```json\n{\n  \"ip_lock\": false,\n  \"last_ip\": \"192.168.1.8\",\n  \"private_network\": \"192.168.2.0\"\n}\n```\n\n### ROOT PRIVILEGE REQUIREMENT\n\nhttps://www.vagrantup.com/docs/synced-folders/nfs.html\n\nTo configure NFS, Vagrant must modify system files on the host. Therefore, at some point during the vagrant up sequence, you may be prompted for administrative privileges (via the typical sudo program). These privileges are used to modify ``/etc/exports`` as well as to start and stop the NFS server daemon.`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferranvila%2Fdockgrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferranvila%2Fdockgrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferranvila%2Fdockgrant/lists"}