{"id":24989131,"url":"https://github.com/engineervix/docker-memcached-sasl","last_synced_at":"2026-02-09T08:02:21.733Z","repository":{"id":255614033,"uuid":"852539671","full_name":"engineervix/docker-memcached-sasl","owner":"engineervix","description":"a custom Docker image for Memcached, created for use with Zulip","archived":false,"fork":false,"pushed_at":"2025-08-15T07:56:06.000Z","size":7,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T00:22:50.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/engineervix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T01:33:01.000Z","updated_at":"2024-09-05T01:58:39.000Z","dependencies_parsed_at":"2024-09-06T10:12:14.282Z","dependency_job_id":null,"html_url":"https://github.com/engineervix/docker-memcached-sasl","commit_stats":null,"previous_names":["engineervix/docker-memcached-sasl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/engineervix/docker-memcached-sasl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineervix%2Fdocker-memcached-sasl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineervix%2Fdocker-memcached-sasl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineervix%2Fdocker-memcached-sasl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineervix%2Fdocker-memcached-sasl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engineervix","download_url":"https://codeload.github.com/engineervix/docker-memcached-sasl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineervix%2Fdocker-memcached-sasl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29259466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-04T12:18:23.119Z","updated_at":"2026-02-09T08:02:21.714Z","avatar_url":"https://github.com/engineervix.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memcached with SASL Authentication\n\n[![Build Docker images](https://github.com/engineervix/docker-memcached-sasl/actions/workflows/build-docker-image.yml/badge.svg)](https://github.com/engineervix/docker-memcached-sasl/actions/workflows/build-docker-image.yml)\n[![Publish Docker images](https://github.com/engineervix/docker-memcached-sasl/actions/workflows/publish-docker-image.yml/badge.svg)](https://github.com/engineervix/docker-memcached-sasl/actions/workflows/publish-docker-image.yml)\n\n\nThis is a custom Docker image for Memcached (based on [this docker compose setup in the Zulip docs](https://github.com/zulip/docker-zulip/blob/6a75497a17e4ed727fb011f39f84cd64ac9ea36f/docker-compose.yml#L18C1-L25C26)), preconfigured to support SASL authentication using plain-text authentication. It automatically sets up the SASL configuration and password database at runtime.\n\nI created it because I was trying to self-host Zulip via [Dokku](https://dokku.com/), and couldn't find a decent way to configure Memcached as in the above setup, using the [Official memcached plugin for dokku](https://github.com/dokku/dokku-memcached).\n\n## Features\n\n- Memcached version `1.6.29-alpine`\n- SASL authentication enabled\n- Custom environment variables for SASL configuration\n- Automatically generates the SASL configuration file and user password database\n\n## Usage\n\n### Build the Image\n\n1. Clone the repository to your local machine:\n\n   ```bash\n   git clone https://github.com/engineervix/docker-memcached-sasl.git\n   cd memcached-sasl\n    ```\n\n2. Build the Docker image:\n\n    ```bash\n    docker build -t your-dockerhub-username/memcached-sasl .\n    ```\n\n3. Push the image to Docker Hub (or another container registry):\n\n    ```bash\n    docker push your-dockerhub-username/memcached-sasl\n    ```\n\n### Environment Variables\n\nThe following environment variables can be configured when running the container:\n\n-   **`SASL_CONF_PATH`**: Path to the SASL configuration file (default: `/home/memcache/memcached.conf`).\n-   **`MEMCACHED_SASL_PWDB`**: Path to the SASL password database (default: `/home/memcache/memcached-sasl-db`).\n-   **`MEMCACHED_PASSWORD`**: Password used for the `zulip` user (default: `\"REPLACE_WITH_SECURE_MEMCACHED_PASSWORD\"`).\n\n### How It Works\n\n1.  The entrypoint script creates the SASL configuration file at the location specified by `SASL_CONF_PATH`. This file enables the plain-text mechanism for SASL authentication.\n\n2.  The script generates a password database file (`MEMCACHED_SASL_PWDB`), containing credentials for the user `zulip`. The username is set as `zulip@localhost` with the password defined by `MEMCACHED_PASSWORD`.\n\n3.  The `memcached -S` command starts Memcached with SASL authentication enabled, enforcing user authentication for all clients.\n\n### Running the Image\n\nYou can run the image directly using Docker:\n\n```bash\ndocker run -d \\\n  -e MEMCACHED_PASSWORD=your_secure_password \\\n  your-dockerhub-username/memcached-sasl\n```\n\nOr, use this image in a Dokku setup:\n\n```bash\nsudo dokku memcached:create memcached-zulip \\\n  --image \"your-dockerhub-username/memcached-sasl\" \\\n  --image-version \"latest\" \\\n  --custom-env \"MEMCACHED_PASSWORD=your_secure_password\"\n```\n\n### Customization\n\n-   If you want to customize the SASL mechanism or add more users, you can modify the `Dockerfile` or adjust the entrypoint script.\n-   For a more secure setup, ensure that the `MEMCACHED_PASSWORD` environment variable is set to a strong, random value.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineervix%2Fdocker-memcached-sasl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineervix%2Fdocker-memcached-sasl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineervix%2Fdocker-memcached-sasl/lists"}