GithubHelp home page GithubHelp logo

dockgrant's Introduction

dockgrant

Travis branch Npm version Code Climate Codacy Badge Inline docs Greenkeeper badge

Run vagrant commands like docker syntax

Just for fun! Or not... I created a command line tool to run vagrant commands like the docker syntax. Maybe you could find this stupid... But I have done Because I can!!! :P

Pre-requisites

Getting Started

Install this globally and you'll have access to the dockgrant command anywhere on your system.

npm install -g dockgrant

Examples

dockgrant run --rm --image hashicorp/precise64 --script "uname -a"

will 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

vf=/tmp/dockgrant-sample &&\
mkdir -p ${vf}/data &&\
echo "echo hello \$VAR" > ${vf}/data/script.sh &&\
chmod +x ${vf}/data/script.sh  &&\
dockgrant run --rm --path ${vf} --volume ${vf}/data:/data --workdir /data -e VAR=world --image hashicorp/precise64 --script "sh script.sh"

will output hello world

Network Collision

If 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:

The specified host network collides with a non-hostonly network!
This will cause your specified IP to be inaccessible. Please change
the IP or name of your host only network so that it no longer matches that of
a bridged or non-hostonly network.

You can define a new private network editing the config file of the program in: ${HOME}/.dockgrant/app.js

{
  "ip_lock": false,
  "last_ip": "192.168.1.8",
  "private_network": "192.168.2.0"
}

ROOT PRIVILEGE REQUIREMENT

https://www.vagrantup.com/docs/synced-folders/nfs.html

To 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.`

dockgrant's People

Contributors

ferranvila avatar greenkeeper[bot] avatar panthro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dockgrant's Issues

VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND

Running the command
dockgrant run --volume /tmp/junit1466397593586992358/build/1/input:/data/input --workdir /data/input --rm -e artifactRegex=^.*\.txt$ --image hashicorp/precise64 --path /tmp/junit1466397593586992358/build/1/input --script ./BUbnwFOtJx.sh

Logs:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Preparing master VM for linked clones...
    default: This is a one time operation. Once the master VM is prepared,
    default: it will be used as a base for linked clones, making the creation
    default: of new VMs take milliseconds on a modern system.
==> default: Cloning VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["clonevm", "d39f2a89-5462-4d81-88b6-75cecddac7e1", "--register", "--name", "temp_clone_1458298974320_64214"]

Stderr: VBoxManage: error: Could not find a registered machine with UUID {d39f2a89-5462-4d81-88b6-75cecddac7e1}
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 431 of file VBoxManageMisc.cpp
VM must be created before running this command. Run `vagrant up` first.
==> default: VM not created. Moving on...

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.