Updated Deployment (markdown)

master
Anthony Lapenna 2016-09-24 22:06:03 +12:00
parent 3364cbc601
commit 1e1b99be17
1 changed files with 40 additions and 1 deletions

@ -1,6 +1,45 @@
# How to deploy Portainer
Here you'll find more information on how to start Portainer.
Portainer can be deployed using Docker (recommended way) or by downloading and extracting the Portainer archive.
## Using Docker
Running Portainer in a container requires that you expose the port 9000 which is the port where the app will be available.
### Using the Docker socket
If you don't specify any target to Portainer, it will try to connect to the Docker engine socket using the path `/var/run/docker.sock`. In order to work, you'll need to bind mount the socket in the container:
```shell
$ docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
```
If your host is using SELinux, you'll need to pass the `--privileged` flag to the Docker run command:
```shell
$ docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
```
You can also specify an alternative socket path by using the `-H` flag and the `unix:///` protocol:
```shell
$ docker run -d -p 9000:9000 -v /var/run/docker.sock:/docker/docker.sock portainer/portainer -H unix://docker/docker.sock
```
### Connect to a remote host
In order to connect to a remote host, use the `-H` flag and the `tcp://` protocol:
```shell
$ docker run -d -p 9000:9000 portainer/portainer -H tcp://<DOCKER_HOST>:<DOCKER_PORT>
```
## Without Docker
Deployment strategies: Deployment strategies:
* Unix socket path
* TLS * TLS
* Nginx reverse proxy * Nginx reverse proxy
* Without Docker * Without Docker