Add '-it' command line options for docker run/exec to documentation

This commit is contained in:
David Personette 2016-01-28 19:05:20 -05:00
parent 49b370aaaf
commit 14e6451ac1
2 changed files with 10 additions and 10 deletions

View File

@ -16,11 +16,11 @@ By default there are no shares configured, additional ones can be added.
## Hosting a Samba instance ## Hosting a Samba instance
sudo docker run -p 139:139 -p 445:445 -d dperson/samba sudo docker run -it -p 139:139 -p 445:445 -d dperson/samba
OR set local storage: OR set local storage:
sudo docker run --name samba -p 139:139 -p 445:445 \ sudo docker run -it --name samba -p 139:139 -p 445:445 \
-v /path/to/directory:/mount \ -v /path/to/directory:/mount \
-d dperson/samba -d dperson/samba
@ -31,7 +31,7 @@ OR set local storage:
Options (fields in '[]' are optional, '<>' are required): Options (fields in '[]' are optional, '<>' are required):
-h This help -h This help
-i "<path>" Import smbpassword -i "<path>" Import smbpassword
required arg: "<path>" - full file path in container to import required arg: "<path>" - full file path in container
-s "<name;/path>[;browsable;readonly;guest;users]" Configure a share -s "<name;/path>[;browsable;readonly;guest;users]" Configure a share
required arg: "<name>;<comment>;</path>" required arg: "<name>;<comment>;</path>"
<name> is how it's called for clients <name> is how it's called for clients
@ -58,25 +58,25 @@ ENVIRONMENT VARIABLES (only available with `docker run`)
## Examples ## Examples
Any of the commands can be run at creation with `docker run` or later with Any of the commands can be run at creation with `docker run` or later with
`docker exec samba.sh` (as of version 1.3 of docker). `docker exec -it samba.sh` (as of version 1.3 of docker).
### Setting the Timezone ### Setting the Timezone
sudo docker run -p 139:139 -p 445:445 -d dperson/samba -t EST5EDT sudo docker run -it -p 139:139 -p 445:445 -d dperson/samba -t EST5EDT
OR using `environment variables` OR using `environment variables`
sudo docker run -e TZ=EST5EDT -p 139:139 -p 445:445 -d dperson/samba sudo docker run -it -e TZ=EST5EDT -p 139:139 -p 445:445 -d dperson/samba
Will get you the same settings as Will get you the same settings as
sudo docker run --name samba -p 139:139 -p 445:445 -d dperson/samba sudo docker run -it --name samba -p 139:139 -p 445:445 -d dperson/samba
sudo docker exec samba samba.sh -t EST5EDT ls -AlF /etc/localtime sudo docker exec -it samba samba.sh -t EST5EDT ls -AlF /etc/localtime
sudo docker restart samba sudo docker restart samba
### Start an instance creating users and shares: ### Start an instance creating users and shares:
sudo docker run -p 139:139 -p 445:445 -d dperson/samba \ sudo docker run -it -p 139:139 -p 445:445 -d dperson/samba \
-u "example1;badpass" \ -u "example1;badpass" \
-u "example2;badpass" \ -u "example2;badpass" \
-s "public;/share" \ -s "public;/share" \

View File

@ -91,7 +91,7 @@ usage() { local RC=${1:-0}
Options (fields in '[]' are optional, '<>' are required): Options (fields in '[]' are optional, '<>' are required):
-h This help -h This help
-i \"<path>\" Import smbpassword -i \"<path>\" Import smbpassword
required arg: \"<path>\" - full file path in container to import required arg: \"<path>\" - full file path in container
-s \"<name;/path>[;browsable;readonly;guest;users]\" Configure a share -s \"<name;/path>[;browsable;readonly;guest;users]\" Configure a share
required arg: \"<name>;<comment>;</path>\" required arg: \"<name>;<comment>;</path>\"
<name> is how it's called for clients <name> is how it's called for clients