Merge ~valentinviennot/ubuntu-docker-images:update-memcached-readme into ~ubuntu-docker-images/ubuntu-docker-images/+git/memcached:edge

Proposed by Valentin Viennot
Status: Merged
Merged at revision: a0b77f23659f5a1b19efe6011aca50600bf95254
Proposed branch: ~valentinviennot/ubuntu-docker-images:update-memcached-readme
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/memcached:edge
Diff against target: 72 lines (+31/-8)
1 file modified
README.md (+31/-8)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior Approve
Richard Harding Pending
Review via email: mp+393901@code.launchpad.net

Description of the change

Extra parameters and additional debug docs (collapsible section).

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

OK. I will address my comment about the network name in a subsequent commit.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/README.md b/README.md
index b8a8027..dd5f31d 100644
--- a/README.md
+++ b/README.md
@@ -21,18 +21,20 @@ Read more on the [memcached website](https://memcached.org/).
2121
22```sh22```sh
23$ docker network create app-net --driver bridge23$ docker network create app-net --driver bridge
24$ docker run -d --name memcached --network app-net squeakywheel/memcached:edge24$ docker run -d --name memcached --network app-net -e TZ=Europe/London squeakywheel/memcached:edge
25```25```
2626
27#### Parameters27#### Parameters
2828
29| Parameter | Description |29| Parameter | Description |
30|---|---|30|---|---|
31| `-e MEMCACHED_CACHE_SIZE=64MB` | Determines the size of the cache |31| `-e TZ=UTC` | Timezone. |
32| `-e MEMCACHED_MAX_CONNECTIONS=1024` | Determines the maximum number of concurrent connections |32| `-e MEMCACHED_CACHE_SIZE=64MB` | Determines the size of the cache. |
33| `-e MEMCACHED_THREADS=4` | Determines the number of threads to process requests |33| `-e MEMCACHED_MAX_CONNECTIONS=1024` | Determines the maximum number of concurrent connections. |
34| `-e MEMCACHED_PASSWORD` | Define the password for the `root` user if another username is provided. By default the authentication is disabled but if this option is passed it becomes enabled |34| `-e MEMCACHED_THREADS=4` | Determines the number of threads to process requests. |
35| `-e MEMCACHED_USERNAME` | Define a new user. If this option is passed a password is needed to authenticate the new user |35| `-e MEMCACHED_PASSWORD` | Define the password for the `root` user if another username is provided. By default the authentication is disabled but if this option is passed it becomes enabled. |
36| `-e MEMCACHED_USERNAME` | Define a new user. If this option is passed a password is needed to authenticate the new user. |
37| `-p 11211` | Memcached is exposed inside the container on port `11211`. |
3638
37#### Testing/Debugging39#### Testing/Debugging
3840
@@ -42,10 +44,32 @@ In case you need to debug what it is happening with the container you can run `d
42$ docker exec -it <name_of_the_container> /bin/bash44$ docker exec -it <name_of_the_container> /bin/bash
43```45```
4446
47<details>
48 <summary>You can access the memcached instance with telnet from another container (click to expand).</summary>
49
50```sh
51# Run an interactive container with the latest Ubuntu
52$ docker run -it --rm --name telnet --network app-net ubuntu bash
53# Install the telnet cli from within the container
54> apt update && apt install telnet -y
55# Connect to the memcached instance using telnet
56> telnet memcached 11211
57Trying 172.30.0.2...
58Connected to memcached.
59Escape character is '^]'.
60```
61From there you can run `memcached` commands, as documented in [their wiki](https://github.com/memcached/memcached/wiki/Commands).
62
63</details>
64
65```sh
66$ telnet memcached 11211
67```
68
45There are cases where one might want to pass some memcached command line flags that are not configurable via environment variables. In this case you can pass the flags themselves or a shell script:69There are cases where one might want to pass some memcached command line flags that are not configurable via environment variables. In this case you can pass the flags themselves or a shell script:
4670
47```71```
48$ docker run -d --name memcached --network net squeakywheel/memcached:edge <flags_or_script_with_flags>72$ docker run -d squeakywheel/memcached:edge <flags_or_script_with_flags>
49```73```
5074
51### Deploy with Kubernetes75### Deploy with Kubernetes
@@ -59,7 +83,6 @@ $ microk8s enable dns storage
5983
60Use the sample deployment yaml provided [here](https://git.launchpad.net/~canonical-server/ubuntu-server-oci/+git/memcached/plain/examples/memcached-deployment.yml).84Use the sample deployment yaml provided [here](https://git.launchpad.net/~canonical-server/ubuntu-server-oci/+git/memcached/plain/examples/memcached-deployment.yml).
6185
62
63<details>86<details>
64 <summary>Apply the `memcached-deployment.yml` (click to expand)</summary>87 <summary>Apply the `memcached-deployment.yml` (click to expand)</summary>
6588

Subscribers

People subscribed via source and target branches