{"id":18438438,"url":"https://github.com/roboconf/rabbitmq-with-ssl-in-docker","last_synced_at":"2025-04-07T20:35:31.581Z","repository":{"id":60109509,"uuid":"90892230","full_name":"roboconf/rabbitmq-with-ssl-in-docker","owner":"roboconf","description":"RabbitMQ and SSL made easy for tests","archived":false,"fork":false,"pushed_at":"2017-05-10T18:01:30.000Z","size":13,"stargazers_count":36,"open_issues_count":0,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T00:31:52.343Z","etag":null,"topics":["docker","docker-image","rabbitmq","ssl","tls"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roboconf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-10T17:43:58.000Z","updated_at":"2024-12-01T03:43:05.000Z","dependencies_parsed_at":"2022-09-25T22:33:53.706Z","dependency_job_id":null,"html_url":"https://github.com/roboconf/rabbitmq-with-ssl-in-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboconf%2Frabbitmq-with-ssl-in-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboconf%2Frabbitmq-with-ssl-in-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboconf%2Frabbitmq-with-ssl-in-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roboconf%2Frabbitmq-with-ssl-in-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roboconf","download_url":"https://codeload.github.com/roboconf/rabbitmq-with-ssl-in-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247726386,"owners_count":20985884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["docker","docker-image","rabbitmq","ssl","tls"],"created_at":"2024-11-06T06:19:50.955Z","updated_at":"2025-04-07T20:35:26.569Z","avatar_url":"https://github.com/roboconf.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQ with SSL Configuration in Docker\n\n\u003e RabbitMQ and SSL made easy for tests.\n\n[![Build Status](https://travis-ci.org/roboconf/rabbitmq-with-ssl-in-docker.svg?branch=master)](https://travis-ci.org/roboconf/rabbitmq-with-ssl-in-docker)\n[![License](https://img.shields.io/hexpm/l/plug.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nThis repository aims at building a RabbitMQ container with SSL enabled.  \nGeneration of the server certificates, as well as server configuration, are performed during\nthe image's build. A client certificate is generated when a container is created from this image.\n\nIt is recommended to mount a volume so that the client certificate can be reached from the\nhost system. Client certificates are generated under the **/home/client** directory.\n\n\n## To build this image\n\n```\ncd tests \u0026\u0026 ./build.sh\n```\n\nThe generated image contains SSL certificates for the server side.\n\n\n## To run this image\n\n```\nmkdir -p /tmp/docker-test \\\n\t\u0026\u0026 rm -rf /tmp/docker-test/* \\\n\t\u0026\u0026 docker run -d --rm -p 12000:5671 -v /tmp/docker-test:/home/client rabbitmq-with-ssl:latest\n```\n\nHere, we bind the port 5671 from the container on the 12000 port on the local host.  \nWe also share a local directory with the container, to retrieve the client certificate.\nYou can verify client certificates were generated with `ls /tmp/docker-test`. This directory contains\na key store and a trust store, both in the PKCS12 format.\n\n\n## To stop the container\n\n`docker stop \u003ccontainer-id\u003e` will stop the container.  \nIf you kept the `--rm` option, it will be deleted directly.\n\n\n## To run quick tests\n\n```\ncd tests \u0026\u0026 ./test.sh\n```\n\n\n## To diagnose troubles\n\n* Verify the client certificates were correctly generated: `ls -l /tmp/docker-test`\n* Inspect the container: `docker exec -ti \u003ccontainer-id\u003e /bin/bash`\n* Check the logs: `docker logs \u003ccontainer-id\u003e`\n* Verify the SSL connection works: `openssl s_client -connect 127.0.0.1:12000 -key /tmp/docker-test/key.pem`  \nThis last command will result in `Verify return code: 19 (self signed certificate in certificate chain)`, which is normal.\nWe should specify the **-CApath**, which is inside the Docker container. This test is enough to verify SSL is enabled and\nthe server is reachable from the host system.\n\n\n## Quick overview of the content\n\n* **Dockerfile**: the file with instructions to create a Docker image.\n* **rabbitmq.config**: the configuration file for RabbitMQ.\n* **openssl.cnf**: a configuration file used during certificates creation.\n* **prepare-server.sh**: a script during the generation of the image and that deals with server certificates.\n* **generate-client-keys.sh**: a script that is run by default when a container is created from this image.\nIt deals with the generation of client certificates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froboconf%2Frabbitmq-with-ssl-in-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froboconf%2Frabbitmq-with-ssl-in-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froboconf%2Frabbitmq-with-ssl-in-docker/lists"}