{"id":27185945,"url":"https://github.com/bdusell/dockerdev","last_synced_at":"2026-05-15T18:04:18.709Z","repository":{"id":73626539,"uuid":"159920616","full_name":"bdusell/dockerdev","owner":"bdusell","description":"Use Docker containers as local development environments","archived":false,"fork":false,"pushed_at":"2025-12-19T03:18:07.000Z","size":25,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-22T00:48:47.963Z","etag":null,"topics":["development","docker"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/bdusell.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-01T07:34:20.000Z","updated_at":"2025-12-19T03:18:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b0cf88b-d4d9-4cf5-9faf-1b60d14140c8","html_url":"https://github.com/bdusell/dockerdev","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bdusell/dockerdev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdusell%2Fdockerdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdusell%2Fdockerdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdusell%2Fdockerdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdusell%2Fdockerdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdusell","download_url":"https://codeload.github.com/bdusell/dockerdev/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdusell%2Fdockerdev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33074416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"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":["development","docker"],"created_at":"2025-04-09T17:55:31.431Z","updated_at":"2026-05-15T18:04:18.693Z","avatar_url":"https://github.com/bdusell.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"dockerdev\n=========\n\nThis repository contains a collection of bash functions that make it extremely\neasy to use Docker containers as local development environments. Using Docker\ncontainers this way keeps the environment in which you develop software both\ndeterministic and isolated from the rest of your system. It is a much more\npowerful form of determinism and isolation than package managers like `npm`\nand `pipenv`, which you can still use inside of the container.\n\nYou are meant to copy the bash scripts in this repository into your own\nsoftware project, write your own scripts that call the helper functions, and\nuse them as part of your workflow.\n\nThe functions defined here automate a lot of the tedium of managing Docker\ncontainers when using them as local development environments. For example,\nwith a single command you can open a shell inside the container, while\nensuring that that the container has been created, that it is running the\nlatest image, and that the internals of the container have been configured\ncorrectly.\n\nThese scripts are the product of lots of trial and error trying to get a\nnice workflow with Docker set up. They have no major dependencies other than\nbash and Docker.\n\nWhy is this useful?\n-------------------\n\nI see Docker, and containers in general, as solving two very important but\ndistinct problems:\n\n1. Dev and production environments should match\n2. Installing the environment necessary to run the app should be automated,\n   deterministic, and isolated from the host system\n   1. in development\n   2. more importantly, in production\n\nThis repository is meant to facilitate point 2.i.\n\nFeatures\n--------\n\n* Automatically creates a container based on a Docker image you specify, or\n  re-uses a previously-created container with that image to avoid constant\n  container refreshing\n* If a container contains an older version of the same image, makes sure to\n  start a new container with the updated image\n* Creates a non-root user inside the container matching your user on the\n  host, so that things like `node_modules` and lock files can be written to\n  the host with the correct permissions using bind mounts\n  * Supported for images based on Ubuntu or Alpine\n* Keeping `node_modules` on the host avoids re-installing them every time the\n  container image changes\n* Fixes the terminal width and height of the shell inside the container\n* Supports callbacks that only run when a new container is started, e.g. for\n  attaching networks to the container\n* Also works for containers that live inside of stacks: given a\n  `docker-compose.yml` file, automatically creates a stack, service, and\n  container if they do not exist\n* If the image of the container in the stack is not up to date, it is\n  automatically updated\n* If the container in the stack needs to be created or updated, automatically\n  waits until the container is ready to run commands before running a command\n* Supports the use of Docker clients within the container by connecting them\n  to the Docker daemon on the host\n* Every function is well-documented, and every quirk and workaround is\n  commented\n\nExample Usage\n-------------\n\n    $ cd /path/to/your/projects/git/repo\n    $ mkdir scripts\n    $ cd scripts\n    $ wget https://raw.githubusercontent.com/bdusell/dockerdev/master/dockerdev.bash\n    $ git add .\n    $ git commit -m 'Add dockerdev scripts.'\n    $ vim shell.bash # Write a script to open a shell in the dev environment\n    $ cd ..\n    $ bash scripts/shell.bash\n    \u003e # Now you're in the container\n\nComplete examples are included under `examples/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdusell%2Fdockerdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdusell%2Fdockerdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdusell%2Fdockerdev/lists"}