{"id":15161780,"url":"https://github.com/mikesir87/docker-secrets-simulator","last_synced_at":"2026-04-07T14:31:20.332Z","repository":{"id":147392929,"uuid":"92344540","full_name":"mikesir87/docker-secrets-simulator","owner":"mikesir87","description":"A Docker Swarm secrets simulator to use during local development with Docker Compose","archived":false,"fork":false,"pushed_at":"2020-09-16T15:45:39.000Z","size":7,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-04T02:48:56.258Z","etag":null,"topics":["docker","docker-compose","docker-secrets"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikesir87.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":"2017-05-24T23:16:10.000Z","updated_at":"2025-10-09T16:21:01.000Z","dependencies_parsed_at":"2023-05-18T04:15:19.333Z","dependency_job_id":null,"html_url":"https://github.com/mikesir87/docker-secrets-simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikesir87/docker-secrets-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesir87%2Fdocker-secrets-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesir87%2Fdocker-secrets-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesir87%2Fdocker-secrets-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesir87%2Fdocker-secrets-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikesir87","download_url":"https://codeload.github.com/mikesir87/docker-secrets-simulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesir87%2Fdocker-secrets-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31515384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"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":["docker","docker-compose","docker-secrets"],"created_at":"2024-09-27T00:45:02.589Z","updated_at":"2026-04-07T14:31:20.310Z","avatar_url":"https://github.com/mikesir87.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Secrets Simulator\n\n![Docker Stars](https://img.shields.io/docker/stars/mikesir87/secrets-simulator.svg)\n![Docker Pulls](https://img.shields.io/docker/pulls/mikesir87/secrets-simulator.svg)\n![Docker Automated Builds](http://img.shields.io/docker/automated/mikesir87/secrets-simulator.svg)\n\n[Blog post here](https://blog.mikesir87.io/2017/05/using-docker-secrets-during-development/)\n\nDocker Secrets are awesome. They provide a secure way to get secret/sensitive data into your container. However, they require a Swarm to run.  Since secrets are exposed simply as files in `/run/secrets`, we can mock it using one of two methods:\n\n- Mount secrets files to `/run/secrets` from the host (which requires you to define a file per secret)\n- Use this image!\n\nThe \"Secrets Simulator\" image will take all defined environment variables and create secrets files where the variable name is the filename and the variable value is the secret content. This allows you to keep everything within your docker-compose.yml!\n\n## How to Use\n\nHere are the quick steps...\n\n1. Add a service using the `mikesir87/secrets-simulator` image to your `docker-compose.yml` file.\n2. Define an environment variable for each secret you want to expose in your app.\n3. Create a volume that will share the new secrets with your app and mount it to both the simulator and app services.\n4. You're done!\n\n## Example\n\nThis is the `docker-compose.yml` found in the repo. So... give it a shot yourself!\n\n```yaml\nversion: '3.1'\n\nservices:\n  secrets-simulator:\n    image: mikesir87/secrets-simulator\n    environment:\n      DB_USERNAME: admin\n      DB_PASSWORD: password1234!\n    volumes:\n      - secrets:/run/secrets:rw\n\n  viewer:\n    image: mikesir87/secrets-viewer\n    volumes:\n      - secrets:/run/secrets:ro\n\nvolumes:\n  secrets:\n    driver: local\n```\n\nAfter running `docker-compose up`, we have output that looks like this:\n\n```\n$ docker-compose up\nCreating network \"secretsimulator_default\" with the default driver\nStarting secretsimulator_secrets-simulator_1 ...\nStarting secretsimulator_secrets-simulator_1\nStarting secretsimulator_viewer_1 ...\nStarting secretsimulator_viewer_1 ... done\nAttaching to secretsimulator_secrets-simulator_1, secretsimulator_viewer_1\nviewer_1             | Starting to dump secrets...\nviewer_1             | DB_PASSWORD : password1234!\nviewer_1             | DB_USERNAME : admin\nsecretsimulator_secrets-simulator_1 exited with code 0\nsecretsimulator_viewer_1 exited with code 0\n```\n\nSo... what happened?  The contents of `/run/secrets` ended up looking like this...\n\n```\n/run/secrets\n    DB_PASSWORD      =\u003e contents of: password1234!\n    DB_USERNAME      =\u003e contents of: admin\n```\n\n\n\n## FAQ\n\n**How can I pick different secrets for different apps?**\n\nYou can run as many simulator services as you wish! You'll just need to create a new volume for each distinct set of secrets.\n\n\n**Why mount secrets as `ro`?**\n\nTo help simulate a \"real\" scenario, I bind the secrets as read-only in the app. That way, I can't make any accidental changes to them.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesir87%2Fdocker-secrets-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikesir87%2Fdocker-secrets-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesir87%2Fdocker-secrets-simulator/lists"}