When logging in to access a Container via SSH, your session's working environment is spawned inside a new Container, inside which your application Container's environment gets mounted to grant you access to the application files. This means any changes outside of your home directory will not be persistent. However, everything stored in your user's home directory should remain.
The number of commands available will vary slightly depending on whether your SSH / SFTP user has access to a single Container or multiple Containers. For instance, consider the following situations:
When the SSH / SFTP user is attached to a single Container:
When the SSH / SFTP user has no Containers attached:
When the SSH user is attached to more than one Container:
The table below shows an example set of commands available to a user attached to a single Redis 3 container vs. a user attached to multiple containers:
|Command||Single Container Access||Multiple Containers Access|
|Standard commands (cd, ls, chown, chmod, git, etc.)||✔||✔|
Each SSH user has been provided with a special directory to store your own binaries making them available anywhere without having to specify the full path. To do so you need to download/upload your binary (or script) inside the
bin directory of your user's home directory.
Here is an example on how to download composer and use it to install SilverStripe on an Apache + PHP 5.6 container:
cd ~ curl -sS https://getcomposer.org/installer | php -- --install-dir=./bin --filename=composer
publicdirectory and start the install:
cd ~/containers/application/public composer create-project --no-dev silverstripe/installer . 3.0.3
SilverStripe requires an empty directory so make sure it is empty first.
There may be a situation where you wish to mark configuration files for your container as readonly to prevent certain SSH / SFTP users from modifying important settings. This can be easily achieved by following the simple steps below: