Skip to content

Commit

Permalink
configure the name of the containers
Browse files Browse the repository at this point in the history
  • Loading branch information
dealfonso committed Dec 3, 2018
1 parent 034ba41 commit 944811e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/bin/shell2docker
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# limitations under the License.

# Variables to be used in the configuration file
_DOSH_KEYS="SCRIPTSFOLDER RUNSCRIPTS LOGFILE UNSAFEEXPAND CONF DEBUG RUNCOMMANDS VERBOSE CONTAINERIMAGE CONTAINERCOMMAND INHERIT DOCKERPARAMETERS"
_DOSH_KEYS="SCRIPTSFOLDER RUNSCRIPTS LOGFILE UNSAFEEXPAND CONF DEBUG RUNCOMMANDS VERBOSE CONTAINERIMAGE CONTAINERCOMMAND INHERIT DOCKERPARAMETERS PREFIXNAME"
_DOSH_INHERITABLE="DOCKERPARAMETERS"

# Functions to output information depending on the configuration
Expand Down Expand Up @@ -191,7 +191,6 @@ GROUP="$(getent group $U_GID | cut -d: -f1)"

# Set the default values
RUNCOMMANDS=true
CONTAINERNAME="container-${USERNAME}"
CONTAINERIMAGE="alpine"
CONTAINERCOMMAND="ash"
DOCKERPARAMETERS=
Expand All @@ -204,6 +203,9 @@ RUNSCRIPTS=false
# Read the default configuration file
readconffiles "/etc/dosh.conf"

# Set the name of the container for the user
CONTAINERNAME="${PREFIXNAME:-dosh-}${USERNAME}"

# Output variables for debug
p_debug "Variables
----------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/etc/dosh.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
# * Default: false. Uncomment the next line to enable DEBUG mode
# DEBUG=true

# Prefix for the name of the per-user container
# * Default: dosh-. The name of the containers will be dosh-<username>
# PREFIXNAME=dosh-

# Enable or disable the execution of the docker commands (for debugging purposes only)
# * Default: true. Uncomment the next line to disable execution
# RUNCOMMANDS=false
Expand Down
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2-1
0.2-2

0 comments on commit 944811e

Please sign in to comment.