diff --git a/Development/docker.md b/Development/docker.md index 49d9e3b..7efe919 100644 --- a/Development/docker.md +++ b/Development/docker.md @@ -4,14 +4,10 @@ Assume you use Archlinux. Read [Docker](https://wiki.archlinux.org/index.php/Docker). -Read [LinuxServer.io/Docs](https://docs.linuxserver.io/). - -Start/enable service: +Enable and start service: ```sh -systemctl start docker.service - -systemctl enable docker.service +systemctl enable --now docker.service ``` Add your user to `docker` group: @@ -37,7 +33,7 @@ Read [docker run](https://docs.docker.com/engine/reference/commandline/run/). | `-t` | | Allocate a pseudo-TTY | | `-v` | `-v ~/abc:/abc` | Bind host directory : container directory | -Run `ubuntu` image: +Example run `ubuntu` image: ```sh docker run --rm -it ubuntu diff --git a/Development/prometheus.md b/Development/prometheus.md index 9ff95a8..ea35c8e 100644 --- a/Development/prometheus.md +++ b/Development/prometheus.md @@ -8,6 +8,7 @@ Docker: docker run -d \ -p 9090:9090 \ -v /path/to/config:/etc/prometheus \ + --name prometheus prom/prometheus ``` @@ -32,6 +33,7 @@ Docker: ```sh docker run -d \ -p 9091:9091 \ + --name pushgateway prom/pushgateway ``` diff --git a/Development/redis.md b/Development/redis.md index 9b59eaf..ac606a7 100644 --- a/Development/redis.md +++ b/Development/redis.md @@ -1,32 +1,25 @@ # Redis -Assume you use Archlinux. - -Read [Redis](https://wiki.archlinux.org/index.php/Redis). - -Start/enable service: +Docker: ```sh -systemctl start redis.service - -systemctl enable redis.service -``` - -Otherwise use docker: - -```sh -docker run -d -p 6379:6379 --name redis redis:alpine +docker run -d \ + -p 6379:6379 \ + --name redis \ + redis:alpine ``` ## redis-cli +`redis-cli` is included in [redis](https://www.archlinux.org/packages/community/x86_64/redis/). + Connect: ```sh redis-cli -h localhost -p 6379 ``` -### After connect +### [Commands](https://redis.io/commands) Get all keys: @@ -39,5 +32,3 @@ Delete all keys: ```sh FLUSHALL ``` - -Read [Commands](https://redis.io/commands).