forked from TrueCloudLab/distribution
Fix link to requirements in Nginx recipe (#3969)
This commit is contained in:
parent
c6f6c44e56
commit
a59d321e8d
1 changed files with 91 additions and 101 deletions
|
@ -67,24 +67,17 @@ properly. For more information, see
|
||||||
|
|
||||||
## Setting things up
|
## Setting things up
|
||||||
|
|
||||||
Read again [the requirements](index.md#requirements).
|
Review the [requirements](../index.md#requirements), then follow ese steps.
|
||||||
|
|
||||||
Ready?
|
1. Create the required directories
|
||||||
|
|
||||||
--
|
```bash
|
||||||
|
mkdir -p auth data
|
||||||
Create the required directories
|
|
||||||
|
|
||||||
```
|
|
||||||
mkdir -p auth
|
|
||||||
mkdir -p data
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Create the main nginx configuration you will use.
|
2. Create the main nginx configuration you will use. Paste this code block into a new file called `auth/nginx.conf`:
|
||||||
|
|
||||||
```
|
```conf
|
||||||
|
|
||||||
cat > auth/nginx.conf << 'EOF'
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
}
|
}
|
||||||
|
@ -148,26 +141,24 @@ http {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Now create a password file for "testuser" and "testpassword"
|
3. Create a password file `auth/nginx.htpasswd` for "testuser" and "testpassword".
|
||||||
|
|
||||||
```
|
```bash
|
||||||
docker run --rm --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/nginx.htpasswd
|
$ docker run --rm --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/nginx.htpasswd
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy over your certificate files
|
4. Copy your certificate files to the `auth/` directory.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cp domain.crt auth
|
$ cp domain.crt auth
|
||||||
cp domain.key auth
|
$ cp domain.key auth
|
||||||
```
|
```
|
||||||
|
|
||||||
Now create your compose file
|
5. Create the compose file. Paste the following YAML into a new file called `docker-compose.yml`.
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
cat <<EOF > docker-compose.yml
|
|
||||||
nginx:
|
nginx:
|
||||||
image: "nginx:1.9"
|
image: "nginx:1.9"
|
||||||
ports:
|
ports:
|
||||||
|
@ -184,7 +175,6 @@ registry:
|
||||||
- 127.0.0.1:5000:5000
|
- 127.0.0.1:5000:5000
|
||||||
volumes:
|
volumes:
|
||||||
- `pwd`./data:/var/lib/registry
|
- `pwd`./data:/var/lib/registry
|
||||||
EOF
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Starting and stopping
|
## Starting and stopping
|
||||||
|
|
Loading…
Reference in a new issue