Skip to content

Commit 97bc115

Browse files
PS-9110 remove [root@docker-host] (#290)
modified: docs/docker.md
1 parent 262b94c commit 97bc115

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

docs/docker.md

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Run Percona Server for MySQL in a Docker Container
22

3-
43
Docker lets developers build, deploy, run, update, and manage containers, which isolate applications from the host system. Docker containers are made from Docker images, which are snapshots of the configuration needed to run an application, such as the code and libraries.
54

65
??? information "Percona solutions"
@@ -78,8 +77,8 @@ available locally.
7877

7978
To view the container's logs, use the following command:
8079

81-
```shell
82-
docker logs ps --follow
80+
```{.bash data-prompt="$"}
81+
$ docker logs ps --follow
8382
```
8483
??? example "Expected output"
8584

@@ -158,8 +157,8 @@ Be sure to test the image throughly before using it in production.
158157

159158
You can pass options with the `docker run` command. For example, the following command uses UTF-8 as the default setting for character set and collation for all databases:
160159

161-
```shell
162-
[root@docker-host] $ docker run -d \
160+
```{.bash data-prompt="$"}
161+
$ docker run -d \
163162
--name ps \
164163
-e MYSQL_ROOT_PASSWORD=root \
165164
percona/percona-server:8.0 \
@@ -173,8 +172,8 @@ The `docker exec` command lets you have a shell inside the container. This comma
173172

174173
An example of accessing the detached container:
175174

176-
```shell
177-
[root@docker-host] $ docker exec -it ps /bin/bash
175+
```{.bash data-prompt="$"}
176+
$ docker exec -it ps /bin/bash
178177
```
179178

180179
If you need to troubleshoot, the error log is found in `/var/log/` or `/var/log/mysql/`. The file name may be error.log or mysqld.log.
@@ -252,8 +251,8 @@ To link a container running your application
252251
with the Percona Server container,
253252
run it with the following command:
254253

255-
```shell
256-
[root@docker-host] $ docker run -d \
254+
```{.bash data-prompt="$"}
255+
$ docker run -d \
257256
--name app \
258257
--link ps \
259258
app/image:latest
@@ -281,8 +280,8 @@ For example, if you create a data directory on a suitable volume
281280
on your host system named `/local/datadir`,
282281
you run the container with the following command:
283282

284-
```shell
285-
[root@docker-host] $ docker run -d \
283+
```{.bash data-prompt="$"}
284+
$ docker run -d \
286285
--name ps \
287286
-e MYSQL_ROOT_PASSWORD=root \
288287
-v /local/datadir:/var/lib/mysql \
@@ -300,8 +299,8 @@ Do not add MYSQL_ROOT_PASSWORD to the `docker run` command if the data directory
300299

301300
If you have SELinux enabled, assign the relevant policy type to the new data directory so that the container will be allowed to access it:
302301

303-
```
304-
[root@docker-host] $ chcon -Rt svirt_sandbox_file_t /local/datadir
302+
```{.bash data-prompt="$"}
303+
$ chcon -Rt svirt_sandbox_file_t /local/datadir
305304
```
306305

307306
## Port forwarding
@@ -315,8 +314,8 @@ This ability simplifies consolidating instances to a single host.
315314

316315
To map the standard MySQL port 3306 to port 6603 on the host:
317316

318-
```shell
319-
[root@docker-host] $ docker run -d \
317+
```{.bash data-prompt="$"}
318+
$ docker run -d \
320319
--name ps \
321320
-e MYSQL_ROOT_PASSWORD=root \
322321
-p 6603:3306 \

0 commit comments

Comments
 (0)