docs(aio): minor docs fixes for `aio-builds-setup/`

This commit is contained in:
Georgios Kalpakas 2017-05-17 17:08:16 +03:00 committed by Pete Bacon Darwin
parent 71c3103312
commit 6f59a4a5b2
3 changed files with 25 additions and 25 deletions

View File

@ -20,7 +20,7 @@
## Starting the docker container ## Starting the docker container
- [Create docker image](vm-setup--start-docker-container.md) - [Start docker container](vm-setup--start-docker-container.md)
## Miscellaneous ## Miscellaneous

View File

@ -6,11 +6,11 @@
## Build docker image ## Build docker image
- `<aio-builds-setup-dir>/scripts/build.sh [<name>[:<tag>] [--build-arg <NAME>=<value> ...]]` - `<aio-builds-setup-dir>/scripts/create-image.sh [<name>[:<tag>] [--build-arg <NAME>=<value> ...]]`
- You can overwrite the default environment variables inside the image, by passing new values using - You can overwrite the default environment variables inside the image, by passing new values using
`--build-arg`. `--build-arg`.
**Note:** The build script has to execute docker commands with `sudo`. **Note:** The script has to execute docker commands with `sudo`.
## Example ## Example

View File

@ -7,16 +7,16 @@ command:
``` ```
sudo docker run \ sudo docker run \
-d \ --detach \
--dns 127.0.0.1 \ --dns 127.0.0.1 \
--name <instance-name> \ --name <instance-name> \
-p 80:80 \ --publish 80:80 \
-p 443:443 \ --publish 443:443 \
--restart unless-stopped \ --restart unless-stopped \
[-v <host-cert-dir>:/etc/ssl/localcerts:ro] \ [--volume <host-cert-dir>:/etc/ssl/localcerts:ro] \
-v <host-secrets-dir>:/aio-secrets:ro \ --volume <host-secrets-dir>:/aio-secrets:ro \
-v <host-builds-dir>:/var/www/aio-builds \ --volume <host-builds-dir>:/var/www/aio-builds \
[-v <host-logs-dir>:/var/log/aio] \ [--volume <host-logs-dir>:/var/log/aio] \
<name>[:<tag>] <name>[:<tag>]
``` ```
@ -27,7 +27,7 @@ can be found [here](https://docs.docker.com/engine/reference/run/).
sudo docker run \ sudo docker run \
# Start as a daemon. # Start as a daemon.
-d \ --detach \
# Use the local DNS server. # Use the local DNS server.
# (This is necessary for mapping internal URLs, e.g. for the Node.js upload-server.) # (This is necessary for mapping internal URLs, e.g. for the Node.js upload-server.)
@ -37,9 +37,9 @@ sudo docker run \
# Useful for running `docker` commands, e.g.: `docker stop <instance-name>` # Useful for running `docker` commands, e.g.: `docker stop <instance-name>`
--name <instance-name> \ --name <instance-name> \
# Map ports of the hosr VM (left) to ports of the docker container (right) # Map ports of the host VM (left) to ports of the docker container (right)
-p 80:80 \ --publish 80:80 \
-p 443:443 \ --publish 443:443 \
# Automatically restart the container (unless it was explicitly stopped by the user). # Automatically restart the container (unless it was explicitly stopped by the user).
# (This ensures that the container will be automatically started on boot.) # (This ensures that the container will be automatically started on boot.)
@ -48,22 +48,22 @@ sudo docker run \
# The directory the contains the SSL certificates. # The directory the contains the SSL certificates.
# (See [here](vm-setup--create-host-dirs-and-files.md) for more info.) # (See [here](vm-setup--create-host-dirs-and-files.md) for more info.)
# If not provided, the container will use self-signed certificates. # If not provided, the container will use self-signed certificates.
[-v <host-cert-dir>:/etc/ssl/localcerts:ro] \ [--volume <host-cert-dir>:/etc/ssl/localcerts:ro] \
# The directory the contains the secrets (e.g. GitHub token, JWT secret, etc). # The directory the contains the secrets (e.g. GitHub token, JWT secret, etc).
# (See [here](vm-setup--set-up-secrets.md) for more info.) # (See [here](vm-setup--set-up-secrets.md) for more info.)
-v <host-secrets-dir>:/aio-secrets:ro \ --volume <host-secrets-dir>:/aio-secrets:ro \
# The uploaded build artifacts will stored to and served from this directory. # The uploaded build artifacts will stored to and served from this directory.
# (If you are using a persistent disk - as described [here](vm-setup--attach-persistent-disk.md) - # (If you are using a persistent disk - as described [here](vm-setup--attach-persistent-disk.md) -
# this will be a directory inside the disk.) # this will be a directory inside the disk.)
-v <host-builds-dir>:/var/www/aio-builds \ --volume <host-builds-dir>:/var/www/aio-builds \
# The directory where the logs are being kept. # The directory where the logs are being kept.
# (See [here](vm-setup--create-host-dirs-and-files.md) for more info.) # (See [here](vm-setup--create-host-dirs-and-files.md) for more info.)
# If not provided, the logs will be kept inside the container, which means they will be lost # If not provided, the logs will be kept inside the container, which means they will be lost
# whenever a new container is created. # whenever a new container is created.
[-v <host-logs-dir>:/var/log/aio] \ [--volume <host-logs-dir>:/var/log/aio] \
# The name of the docker image to use (and an optional tag; defaults to `latest`). # The name of the docker image to use (and an optional tag; defaults to `latest`).
# (See [here](vm-setup--create-docker-image.md) for instructions on how to create the iamge.) # (See [here](vm-setup--create-docker-image.md) for instructions on how to create the iamge.)
@ -78,15 +78,15 @@ by the container for accesing secrets and SSL certificates and keeping the build
``` ```
sudo docker run \ sudo docker run \
-d \ --detach \
--dns 127.0.0.1 \ --dns 127.0.0.1 \
--name foobar-builds-1 \ --name foobar-builds-1 \
-p 80:80 \ --publish 80:80 \
-p 443:443 \ --publish 443:443 \
--restart unless-stopped \ --restart unless-stopped \
-v /etc/ssl/localcerts:/etc/ssl/localcerts:ro \ --volume /etc/ssl/localcerts:/etc/ssl/localcerts:ro \
-v /foobar-secrets:/aio-secrets:ro \ --volume /foobar-secrets:/aio-secrets:ro \
-v /mnt/disks/foobar-builds:/var/www/aio-builds \ --volume /mnt/disks/foobar-builds:/var/www/aio-builds \
-v /foobar-logs:/var/log/aio \ --volume /foobar-logs:/var/log/aio \
foobar-builds foobar-builds
``` ```