docker-polyfill 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.idea/aws.xml ADDED
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="accountSettings">
4
+ <option name="activeProfile" value="profile:default" />
5
+ <option name="activeRegion" value="us-east-1" />
6
+ <option name="recentlyUsedProfiles">
7
+ <list>
8
+ <option value="profile:default" />
9
+ </list>
10
+ </option>
11
+ <option name="recentlyUsedRegions">
12
+ <list>
13
+ <option value="us-east-1" />
14
+ </list>
15
+ </option>
16
+ </component>
17
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptLibraryMappings">
4
+ <includedPredefinedLibrary name="Node.js Core" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/docker-polyfill.iml" filepath="$PROJECT_DIR$/.idea/docker-polyfill.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/php.xml ADDED
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="MessDetectorOptionsConfiguration">
4
+ <option name="transferred" value="true" />
5
+ </component>
6
+ <component name="PHPCSFixerOptionsConfiguration">
7
+ <option name="transferred" value="true" />
8
+ </component>
9
+ <component name="PHPCodeSnifferOptionsConfiguration">
10
+ <option name="highlightLevel" value="WARNING" />
11
+ <option name="transferred" value="true" />
12
+ </component>
13
+ <component name="PhpStanOptionsConfiguration">
14
+ <option name="transferred" value="true" />
15
+ </component>
16
+ <component name="PsalmOptionsConfiguration">
17
+ <option name="transferred" value="true" />
18
+ </component>
19
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
- "name": "docker-polyfill",
3
- "description": "A general polyfill for docker command execution",
4
- "version": "0.0.9",
5
- "author": "Ziggeo",
6
- "repository": "https://github.com/jsonize/docker-polyfill",
7
- "license": "Apache-2.0",
8
- "engines": {
9
- "node": ""
10
- },
11
- "main": "src/runner.js"
2
+ "name": "docker-polyfill",
3
+ "description": "A general polyfill for docker command execution",
4
+ "version": "0.0.11",
5
+ "author": "Ziggeo",
6
+ "repository": "https://github.com/jsonize/docker-polyfill",
7
+ "license": "Apache-2.0",
8
+ "engines": {
9
+ "node": ""
10
+ },
11
+ "main": "src/runner.js"
12
12
  }
package/src/files.js CHANGED
@@ -20,7 +20,8 @@ module.exports = {
20
20
  var files = {};
21
21
  args.forEach(function (arg) {
22
22
  while (match = FilenameRegex.exec(arg))
23
- files[match[1]] = true;
23
+ if (arg.indexOf("://") === -1)
24
+ files[match[1]] = true;
24
25
  });
25
26
  var result = [];
26
27
  for (var file in files)
package/src/runner.js CHANGED
@@ -45,6 +45,8 @@ module.exports = {
45
45
  const container = options.container;
46
46
  // command can be undefined
47
47
  const command = options.command;
48
+ // dockerUser can be undefined
49
+ const dockerUser = options.dockerUser;
48
50
  var argv = options.argv || [];
49
51
  // replace arguments with replacement hash
50
52
  if (options.replaceArguments) {
@@ -68,6 +70,10 @@ module.exports = {
68
70
  const mountParameters = Files.generateMountParameters(fileMounts);
69
71
  // generate command line
70
72
  var dockerArgs = ["run", "--rm"];
73
+ if (dockerUser) {
74
+ dockerArgs.push("--user");
75
+ dockerArgs.push(dockerUser);
76
+ }
71
77
  dockerArgs = dockerArgs.concat(mountParameters);
72
78
  if (command) {
73
79
  dockerArgs.push("--entrypoint");