Permalink
Newer
100644
132 lines (94 sloc)
4.13 KB
1
<!--
2
COmanage Registry Docker documentation
3
4
Portions licensed to the University Corporation for Advanced Internet
5
Development, Inc. ("UCAID") under one or more contributor license agreements.
6
See the NOTICE file distributed with this work for additional information
7
regarding copyright ownership.
8
9
UCAID licenses this file to you under the Apache License, Version 2.0
10
(the "License"); you may not use this file except in compliance with the
11
License. You may obtain a copy of the License at:
12
13
http://www.apache.org/licenses/LICENSE-2.0
14
15
Unless required by applicable law or agreed to in writing, software
16
distributed under the License is distributed on an "AS IS" BASIS,
17
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
See the License for the specific language governing permissions and
19
limitations under the License.
20
-->
21
24
Intended to build a COmanage Registry image using Apache HTTP Server Basic Auth
25
(Basic Auth) as the authentication mechanism.
26
27
Basic Auth is only suitable for COmanage Registry deployments
28
not operating in a federated identity context, or for an introduction
29
to COmanage Registry.
30
31
See other documentation in this repository for examples on how to build images
34
## Build Arguments
35
36
Building the image requires the following build arguments:
39
--build-arg COMANAGE_REGISTRY_VERSION=<version number>
40
--build-arg COMANAGE_REGISTRY_BASE_IMAGE_VERSION=<base image version number>
43
## Build Requirements
44
45
This image uses a [multi-stage build](https://docs.docker.com/develop/develop-images/multistage-build/)
46
and requires that the [COmanage Registry base image](../comanage-registry-base/README.md) be built first.
47
48
## Building
49
52
docker build \
53
--build-arg COMANAGE_REGISTRY_VERSION=<COmanage Registry version number> \
54
--build-arg COMANAGE_REGISTRY_BASE_IMAGE_VERSION=<base image version number> \
55
-t comanage-registry:<tag> .
56
```
60
```
61
export COMANAGE_REGISTRY_VERSION=3.2.1
62
export COMANAGE_REGISTRY_BASE_IMAGE_VERSION=1
63
export COMANAGE_REGISTRY_BASIC_AUTH_IMAGE_VERSION=1
64
TAG="${COMANAGE_REGISTRY_VERSION}-basic-auth-${COMANAGE_REGISTRY_BASIC_AUTH_IMAGE_VERSION}"
66
--build-arg COMANAGE_REGISTRY_VERSION=${COMANAGE_REGISTRY_VERSION} \
67
--build-arg COMANAGE_REGISTRY_BASE_IMAGE_VERSION=${COMANAGE_REGISTRY_BASE_IMAGE_VERSION} \
68
-t comanage-registry:$TAG .
73
See [COmanage Registry Volumes and Data Persistence](../docs/volumes-and-data-persistence.md).
77
See the [list of environment variables common to all images](../docs/comanage-registry-common-environment-variables.md)
78
including this image.
82
This image supports using Apache HTTP Server Basic Auth (Basic Auth) as the
83
authentication mechanism. To aid simple deployments for evaluating and
84
learning COmanage Registry a password file with a single user and password
85
is included. See the section above on environment variables.
87
To override the default bind mount or COPY in a password file created
88
with the `htpasswd` command line tool. For example
96
The image listens for web traffic on ports 80 and 443. All requests
97
on port 80 are redirected to port 443.
101
See other documentation in this repository for details on how to orchestrate
102
running this image with other images using an orchestration tool like
103
Docker Compose, Docker Swarm, or Kubernetes.
104
105
To run this image:
108
docker run -d \
109
--name comanage-registry \
110
-v /opt/comanage-registry-local:/srv/comanage-registry/local \
111
-p 80:80 \
112
-p 443:443 \
113
comanage-registry:3.2.1-basic-auth-1
117
118
Both Apache HTTP Server and COmanage Registry log to the stdout and
119
stderr of the container.
120
121
## HTTPS Configuration
122
123
See the section on environment variables and the `HTTPS_CERT_FILE` and
124
`HTTPS_PRIVKEY_FILE` variables.
126
Additionally you may bind mount or COPY in an X.509 certificate file (containing the CA signing certificate(s), if any)
127
and associated private key file. For example