./script/workspace [OPTION...] [DIRECTORY...]
Option | Description | |
---|---|---|
-h |
--help |
Print usage instructions |
Assign custom container hostname |
||
Override container images (default 'ashenm/workspace:latest') |
||
Assign custom container name |
||
--blank |
Avoid all extended customisations |
|
Avoid all extended customisations |
||
Avoid ~/.gitconfig read-only bind mount |
||
Avoid ~/.gnupg bind mount |
||
Avoid population of host IP mapping |
||
Avoid directory mount |
||
Avoid container’s 8080, 8081 and 8082 ports exposition to the host |
||
Avoid ~/.ssh read-only bind mount |
||
Avoid automatic removal of container on exit |
The arguments to workspace
can be used to bind mount a host directory, current
directory will be assumed unless specified, to a new container either using a
relative or an absolute path. It will be binded at ~/workspace
on the created container.
For instance, to bind current directory run ./workspace .
or simply ./workspace
.
Similarly, to bind a directory like C:\foo\bar
using an absolute path on a
Windows* system to container’s ~/workspace
run ./workspace C:\foo\bar
.
The provision of multiple directory paths, absolute or relative, will bind all
specified directories onto the container’s ~/workspace
bearing respective sub-directory names.
For instance, the command ./workspace foo bar
will bind the directories foo
and bar
within current working directory onto container’s ~/workspace/foo
and
~/workspace/bar
respectively.
The workspace
can be used to run any docker image that is not intended to be
run as an executable. By default, it will attempt to use ashenm/workspace:latest
as the image unless specified.
The default image can be overridden by simply specifying the desired image name
via option --image
. If multiple images are specified the last most image name will be used.
For instance, to bind current directory within alpine:latest run ./workspace --image alpine:latest
.
Please refer official Docker documentation
The Docker Desktop currently uses SMB/CIFS for host volumes and therefore does not support multiple users nor different file permissions on host mounts.
A mundane solution would be to use Docker Volumes
which are independent of the directory structure of the host machine.
The volume/workspace.cmd
facilitate ease administration of Docker Volumes
allowing creation, backup,
upload, and deletion.
Creates a new Docker Volume named workspace that containers can consume and store data in.
Creates a gzip tarball in the current working directory from the files stored in Docker Volume workspace.
Given that Docker is installed, the facilitator scripts provided can be used with any shell that is is Bourne SHell compatible.
For Microsoft Windows use a POSIX-compliant run-time environment such as MSYS or Cygwin with WinPTY or Microsoft’s own Windows Subsystem for Linux.