Skip to content
Permalink
Newer
Older
100644 66 lines (51 sloc) 1.92 KB
April 10, 2017 11:23
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
22
# MariaDB for COmanage Registry
23
24
A simple example demonstrating how to create and image and container
25
based on MariaDB to use with COmanage Registry containers.
26
27
## Build
28
29
There is no image to build. You can directly use the official MariaDB
30
image hosted on DockerHub.
31
32
## Run
33
34
Create a user-defined network bridge with
35
36
```
37
docker network create --driver=bridge \
38
--subnet=192.168.0.0/16 \
39
--gateway=192.168.0.100 \
40
comanage-registry-internal-network
41
```
42
43
and then mount a host directory such as `/tmp/mariadb-data`
44
to `/var/lib/mysql` inside the container to persist
45
data. Use the environment variables
46
47
```
48
MYSQL_ROOT_PASSWORD
49
MYSQL_DATABASE
50
MYSQL_USER
51
MYSQL_PASSWORD
52
```
53
54
to set the password for the MySQL root user, the name of the COmanage
55
Registry database, and the name and password of the database user. For example
56
57
```
58
docker run -d --name comanage-registry-database \
59
--network comanage-registry-internal-network \
60
-v /tmp/mariadb-data:/var/lib/mysql \
61
-e MYSQL_ROOT_PASSWORD=XXXXXXXX \
62
-e MYSQL_DATABASE=registry \
63
-e MYSQL_USER=registry_user \
64
-e MYSQL_PASSWORD=xxxxxxxx \
65
mariadb
66
```