Docker Machine
scripts
Please review the base scripts on our github repository.
init
Used for the initialization of the virtual machine (vm) instance. This method will normally be used to initialize the vm instance, but will not be required after.
cd /opt/boxen/repo/vm./confluence-vm.sh init |
create
Can be used stand-alone, but is generally used as part of the 'init'.
delete
Shutdown the VM instance and delete.
start
Start an already initialized VM.
stop
Stop a running VM.
restart
Restart an already executing VM.
ssh
Gain ssh access to a running instance of the VM.
attach
Attach to a running instance of the VM and view console output.
status
View status information associated with running instance of VM.
Example Output
XAVIER:vm ga-mlsdiscovery$ ./stash-vm.sh statusDocker Virtual Machine (stash-vm)RunningCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESbbc767be3fbb atlassian/stash "./bin/start-stash.sh" 19 hours ago Up 19 hours 0.0.0.0:7990->7990/tcp, 0.0.0.0:7999->7999/tcp stash
|
inspect
View details about a running instance of the VM.
Example Output
XAVIER:vm ga-mlsdiscovery$ ./stash-vm.sh inspectDocker Virtual Machine (stash-vm)[{ "Id": "f1f430b54be85ce50f937feb85b3c7ca1c4d10e8982fb31cfaf958bb82ab1586",
"Parent": "2cc45471c854425f26002abcf60f40ef37922fd4c960d65ec238e87bf277203e",
"Comment": "",
"Created": "2015-08-28T04:22:02.59075488Z",
"Container": "28625eb37c0c2addb57441ead09da2c1c9e7decf543667caa8bb8aed7f2ed766",
"ContainerConfig": {
"Hostname": "1a382cba094f",
"Domainname": "",
"User": "daemon:daemon",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"7990/tcp": {},
"7999/tcp": {}
},
"PublishService": "",
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"JAVA_VERSION=7u79",
"JAVA_DEBIAN_VERSION=7u79-2.5.6-1~deb8u1",
"STASH_HOME=/var/atlassian/application-data/stash",
"RUN_USER=daemon",
"RUN_GROUP=daemon",
"STASH_INSTALL_DIR=/opt/atlassian/stash",
"STASH_VERSION=3.11.2"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) CMD [\"./bin/start-stash.sh\" \"-fg\"]"
],
"Image": "2984c730f9a4440221b72f1550e5a8fa552339906e52d435c156c56ebf900451",
"Volumes": {
"/opt/atlassian/stash": {}
},
"VolumeDriver": "",
"WorkingDir": "/opt/atlassian/stash",
"Entrypoint": null,
"NetworkDisabled": false,
"MacAddress": "",
"OnBuild": [],
"Labels": {}
},
"DockerVersion": "1.6.2",
"Author": "Atlassian Stash Team",
"Config": {
"Hostname": "1a382cba094f",
"Domainname": "",
"User": "daemon:daemon",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"7990/tcp": {},
"7999/tcp": {}
},
"PublishService": "",
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"JAVA_VERSION=7u79",
"JAVA_DEBIAN_VERSION=7u79-2.5.6-1~deb8u1",
"STASH_HOME=/var/atlassian/application-data/stash",
"RUN_USER=daemon",
"RUN_GROUP=daemon",
"STASH_INSTALL_DIR=/opt/atlassian/stash",
"STASH_VERSION=3.11.2"
],
"Cmd": [
"./bin/start-stash.sh",
"-fg"
],
"Image": "2984c730f9a4440221b72f1550e5a8fa552339906e52d435c156c56ebf900451",
"Volumes": {
"/opt/atlassian/stash": {}
},
"VolumeDriver": "",
"WorkingDir": "/opt/atlassian/stash",
"Entrypoint": null,
"NetworkDisabled": false,
"MacAddress": "",
"OnBuild": [],
"Labels": {}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 0,
"VirtualSize": 546775193,
"GraphDriver": {
"Name": "aufs",
"Data": null
}
}] |
settings
Example Output
XAVIER:vm ga-mlsdiscovery$ ./stash-vm.sh settingsDocker Virtual Machine (stash-vm)DOCKER_IMAGE=atlassian/stashDOCKER_CONTAINER=stashDOCKER_DATA_DIR=/Users/Shared/data/stashDOCKER_VM_NAME=stash-vmDOCKER_VM_MEMORY=2048
DOCKER_VM_CPUS=2
DOCKER_VM_ARGS= |