{ "info": { "author": "SDC-CH", "author_email": "sdc-ch@unige.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Using DockerPhosphoros\n\n## Starting the container\n\nUsing DockerPhosphoros is straight forward. First you have to start the Phosphoros docker container (which will continue running in the background):\n\n```bash\nDockPhos start\n```\n\nNote that when you start the container, your Phosphoros root directory will be mounted to the container (see Directory Organization for more information of what this directory is). If this directory does not exist (by default is the directory Phosphoros under your home directory) the container will not start and you will get an error message. To fix this you just have to create the directory.\n\n**Tip**: The first time you start the Phosphoros docker container, it will be downloaded from the internet. This may take a while, so be patient. The next time you start the container everything will be available locally and it will start much faster.\n\n\n## Using a different Phosphoros root directory\n\nIf you do not want to use the default Phosphoros root directory you can either set the environment variable `PHOSPHOROS_ROOT` or your can pass the -d option to the start command:\n\n```bash\nDockPhos start -d \"/your/phosphoros/root/dir\"\n```\n\nIf the Phosphoros container was already running it will be restarted and the new directory will be mounted. Again, the directory must already exist, otherwise you will get an error message.\n\n## Connecting to the container\n\nTo connect to the container you can use the following command:\n\n```bash\nDockPhos connect\n```\n\nAfter running this command your terminal will be moved in the Phosphoros container. From there you can use any of the Phosphoros commands, for example:\n\n```bash\nPhosphoros GUI\n```\n\n**Tip:** You can run the `DockPhos` connect command in multiple terminals and all of them will connect to the same container\nNote that when you are inside the container you are the user phosphoros and that the Phosphoros root directory is mounted under `/home/phosphoros/Phosphoros`.\n\n**Warning:** The filesystem of the container is NOT the same with yours! Your local files will not be accessible from inside the container. The only exception is the Phosphoros root directory, which can be used to move files in and out of the container.\n\nWhen you want to leave the container and return back to your machine you can just type exit. This will not stop the Phosphoros container. You can re-connect using the `DockPhos` connect command.\n\n## Choosing the Phosphoros version\n\nBy default, when run the start command the latest stable version of Phosphoros is used. If you want to use a different version you can use the -v option when you start the container:\n\n```bash\nDockPhos start -v \"\"\n```\n\nIf you want to get a list of all the available versions you can run the command:\n\n```bash\nDockPhos versions\n```\n\n## Stopping the container\n\nAfter you finish you work and you exit the container using the exit command you can stop stop the Phosphoros container to release your resources by running:\n\n```bash\nDockPhos stop\n```\n\n## Advanced options\n\n### Mounting extra directories\n\nSometimes you might need to have access to files which are not under the Phosphoros root directory. To mount extra directories, so they are visible from inside the container you can use the -m option when you start the container:\n\n```bash\nDockPhos start -m \"/directory/to/mount\"\n```\n\nAll directories mounted this way are visible in the container under the /mount directory and they contain the full absolute path of the mounted directory. For example, the above command will make the directory available inside the container user:\n\n```\n/mount/directory/to/mount\n```\n\nIf the directory path is too long, you can use an alias name, by prefixing the directory to mount with : and the alias name:\n\n```bash\nDockPhos start -m \"/directory/to/mount:mydir\"\n```\n\nThe above command will make the directory available inside the container under:\n\n```\n/mount/mydir\n```\n\nIf you want to mount more than one directories you can pass multiple directories to the `-m` option, separated by space:\n\n```bash\nDockPhos start -m /first/dir/to/mount:first /second/dir/to/mount:second\n```\n\n### Deleting the Phosphoros docker images\n\nWhen you run the `DockPhos` start command, docker will download from the internet the Phosphoros docker images. The location where these files are stored depends on the OS and they are managed by the docker itself. If you want to delete all these images to get back your disk space you can run the command:\n\n```bash\nDockPhos cleanup\n```\n\n**Tip:** The next time you start the docker container the images will be re-downloaded automatically\n\n### Minimizing the disk space usage\n\nThe Phosphoros docker images can be quite big. This is to support extra functionality above the core Phosphoros. If you have disk space limitations and you are not interested on the post-processing functionality you can use the `-l` option when you start the container, which will download a smaller image:\n\n```bash\nDockPhos start -l \"