readme: document use of docker exec to gain shell access

This commit is contained in:
Sameer Naik 2014-10-28 10:04:23 +05:30
parent 9127b10b42
commit be40a8b820

View File

@ -786,11 +786,17 @@ By default, when automated backups are enabled, backups are held for a period of
## Shell Access
For debugging and maintenance purposes you may want access the container shell. Since the container does not allow interactive login over the SSH protocol, you can use the [nsenter](http://man7.org/linux/man-pages/man1/nsenter.1.html) linux tool (part of the util-linux package) to access the container shell.
For debugging and maintenance purposes you may want access the containers shell. If you are using docker version `1.3.0` or higher you can access a running containers shell using `docker exec` command.
```bash
docker exec -it gitlab bash
```
If you are using an older version of docker, you can use the [nsenter](http://man7.org/linux/man-pages/man1/nsenter.1.html) linux tool (part of the util-linux package) to access the container shell.
Some linux distros (e.g. ubuntu) use older versions of the util-linux which do not include the `nsenter` tool. To get around this @jpetazzo has created a nice docker image that allows you to install the `nsenter` utility and a helper script named `docker-enter` on these distros.
To install the nsenter tool on your host execute the following command.
To install `nsenter` execute the following command on your host,
```bash
docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
@ -804,8 +810,6 @@ sudo docker-enter gitlab
For more information refer https://github.com/jpetazzo/nsenter
Another tool named `nsinit` can also be used for the same purpose. Please refer https://jpetazzo.github.io/2014/03/23/lxc-attach-nsinit-nsenter-docker-0-9/ for more information.
# Upgrading
GitLabHQ releases new versions on the 22nd of every month, bugfix releases immediately follow. I update this project almost immediately when a release is made (at least it has been the case so far). If you are using the image in production environments I recommend that you delay updates by a couple of days after the gitlab release, allowing some time for the dust to settle down.