Skip to content

Commit

Permalink
hello quay.io, bye-bye hub.docker.com
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameer Naik committed Oct 11, 2015
1 parent 0df65a4 commit f4be94d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ In your issue report please make sure you provide the following information:

# Installation

Pull the latest version of the image from the docker index. This is the recommended method of installation as it is easier to update image in the future. These builds are performed by the **Docker Trusted Build** service.
Automated builds of the image are available on [Quay.io](https://quay.io/repository/sameersbn/mysql) and is the recommended method of installation.

```bash
docker pull sameersbn/mysql:latest
docker pull quay.io/sameersbn/mysql:latest
```

Alternately you can build the image yourself.
Expand All @@ -75,13 +75,13 @@ docker build -t="$USER/mysql" .
Run the mysql image

```bash
docker run --name mysql -d sameersbn/mysql:latest
docker run --name mysql -d quay.io/sameersbn/mysql:latest
```

You can access the mysql server as the root user using the following command:

```bash
docker run -it --rm --volumes-from=mysql sameersbn/mysql:latest mysql -uroot
docker run -it --rm --volumes-from=mysql quay.io/sameersbn/mysql:latest mysql -uroot
```

# Data Store
Expand All @@ -99,7 +99,7 @@ The updated run command looks like this.

```
docker run --name mysql -d \
-v /opt/mysql/data:/var/lib/mysql sameersbn/mysql:latest
-v /opt/mysql/data:/var/lib/mysql quay.io/sameersbn/mysql:latest
```

This will make sure that the data stored in the database is not lost when the image is stopped and started again.
Expand All @@ -113,30 +113,30 @@ This will make sure that the data stored in the database is not lost when the im
> However if you were using this image before this feature was added, then it will not work as-is. You are required to create the `debian-sys-maint` user
>
>```bash
>docker run -it --rm --volumes-from=mysql sameersbn/mysql \
>docker run -it --rm --volumes-from=mysql quay.io/sameersbn/mysql \
> mysql -uroot -e "GRANT ALL PRIVILEGES on *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION;"
>```
To create a new database specify the database name in the `DB_NAME` variable. The following command creates a new database named *dbname*:
```bash
docker run --name mysql -d \
-e 'DB_NAME=dbname' sameersbn/mysql:latest
-e 'DB_NAME=dbname' quay.io/sameersbn/mysql:latest
```
You may also specify a comma separated list of database names in the `DB_NAME` variable. The following command creates two new databases named *dbname1* and *dbname2*

```bash
docker run --name mysql -d \
-e 'DB_NAME=dbname1,dbname2' sameersbn/mysql:latest
-e 'DB_NAME=dbname1,dbname2' quay.io/sameersbn/mysql:latest
```

To create a new user you should specify the `DB_USER` and `DB_PASS` variables.

```bash
docker run --name mysql -d \
-e 'DB_USER=dbuser' -e 'DB_PASS=dbpass' -e 'DB_NAME=dbname' \
sameersbn/mysql:latest
quay.io/sameersbn/mysql:latest
```

The above command will create a user *dbuser* with the password *dbpass* and will also create a database named *dbname*. The *dbuser* user will have full/remote access to the database.
Expand All @@ -153,7 +153,7 @@ To create a remote user with privileged access, you need to specify the `DB_REMO
```bash
docker run --name mysql -d \
-e 'DB_REMOTE_ROOT_NAME=root' -e 'DB_REMOTE_ROOT_PASS=secretpassword' \
sameersbn/mysql:latest
quay.io/sameersbn/mysql:latest
```

Optionally you can specify the `DB_REMOTE_ROOT_HOST` variable to define the address space within which remote access should be permitted. This defaults to `172.17.42.1` and should suffice for most cases.
Expand Down Expand Up @@ -202,11 +202,11 @@ docker stop mysql
- **Step 2**: Update the docker image.

```bash
docker pull sameersbn/mysql:latest
docker pull quay.io/sameersbn/mysql:latest
```

- **Step 3**: Start the image

```bash
docker run --name mysql -d [OPTIONS] sameersbn/mysql:latest
docker run --name mysql -d [OPTIONS] quay.io/sameersbn/mysql:latest
```

0 comments on commit f4be94d

Please sign in to comment.