@sumor/ssh-docker
Advanced tools
Comparing version
{ | ||
"name": "@sumor/ssh-docker", | ||
"description": "ssh-docker is a docker tool for @sumor/ssh-tools", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "sumor-cloud/ssh-docker", |
@@ -80,6 +80,15 @@ # ssh-docker | ||
version: version, | ||
ports: [{ from: 443, to: 30000 }], | ||
folders: { | ||
config: '/path/to/config/folder' | ||
} | ||
ports: [ | ||
{ | ||
from: 443, // container port | ||
to: 30123 // host port | ||
} | ||
], | ||
folders: [ | ||
{ | ||
from: '/usr/source/config', // container folder | ||
to: '/path/to/config/folder', // host folder | ||
readOnly: true // optional, default is false | ||
} | ||
] | ||
}) | ||
@@ -86,0 +95,0 @@ |
@@ -5,6 +5,5 @@ export default options => { | ||
if (folders) { | ||
for (const folder in folders) { | ||
const path = folders[folder] | ||
const instancePath = `/usr/source/${folder}` | ||
dockerRunStr.push(`-v ${path}:${instancePath}:ro`) | ||
for (const folder of folders) { | ||
const readOnly = folder.readOnly ? ':ro' : '' | ||
dockerRunStr.push(`-v ${folder.to}:${folder.from}${readOnly}`) | ||
} | ||
@@ -11,0 +10,0 @@ } |
9153
1.82%112
8.74%121
-0.82%