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 +17 -0
- package/.idea/docker-polyfill.iml +8 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/php.xml +19 -0
- package/.idea/vcs.xml +6 -0
- package/package.json +10 -10
- package/src/files.js +2 -1
- package/src/runner.js +6 -0
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,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
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
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");
|