{"id":19370622,"url":"https://github.com/evidence-dev/docker-devenv","last_synced_at":"2026-02-27T05:03:44.453Z","repository":{"id":37591849,"uuid":"488349977","full_name":"evidence-dev/docker-devenv","owner":"evidence-dev","description":"This repo builds a Docker image whose container instances can be used as a development environment for Evidence projects via a mounted directory","archived":false,"fork":false,"pushed_at":"2024-12-13T17:36:22.000Z","size":44,"stargazers_count":16,"open_issues_count":6,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-23T06:03:49.820Z","etag":null,"topics":[],"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/evidence-dev.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}},"created_at":"2022-05-03T20:14:02.000Z","updated_at":"2025-01-19T22:59:55.000Z","dependencies_parsed_at":"2025-04-23T15:42:58.655Z","dependency_job_id":"66411f90-dfd3-4b32-bf08-eb190d407fe4","html_url":"https://github.com/evidence-dev/docker-devenv","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/evidence-dev/docker-devenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdocker-devenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdocker-devenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdocker-devenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdocker-devenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evidence-dev","download_url":"https://codeload.github.com/evidence-dev/docker-devenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evidence-dev%2Fdocker-devenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29885799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-10T08:16:07.524Z","updated_at":"2026-02-27T05:03:44.439Z","avatar_url":"https://github.com/evidence-dev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Development Environment\n\nThe Evidence Docker Development Environment (devenv) image is available on [Docker Hub](https://hub.docker.com/repositories/evidencedev). \n\nThe `devenv` image can be used as a development environment for Evidence projects by running it as a container with a mounted directory. Utilizing this container allows developers to work on Evidence sites without the need to install any additional toolchains other than `Docker`. For instance, there is no necessity to install `npm` or `node`.\n\nThis repository contains the Dockerfiles, the publishing actions, and usage documentation pertaining to [Evidence `devenv` images](https://hub.docker.com/repositories/evidencedev).\n\n## Using the Evidence Docker Development Environment\n\n### Pre-requisites\nEnsure the Docker tool chain is installed via [Docker Desktop](https://www.docker.com/products/docker-desktop/) (recommended) OR using [binaries](https://docs.docker.com/engine/install/binaries/).\n\n### Starting the Docker Evidence Development Environment\n\n#### Option 1: Create a **new Evidence project** from scratch using the Evidence project template:\n```        \n        cd \u003cpath-to-your-evidence-project-root\u003e\n        docker run -v=$(pwd):/evidence-workspace -p=3000:3000 -it --rm evidencedev/devenv:latest --init\n```\n\n* Make sure your project is in the allowed directory (https://docs.docker.com/desktop/settings-and-maintenance/settings/#virtual-file-shares)\n* In this case, `\u003cpath-to-your-evidence-project-root\u003e` should be an empty directory.\n* You should see the template site up when you point your browser to `localhost:3000`.\n* You should see new files, copied from the Evidence project template, in `\u003cpath-to-your-evidence-project-root\u003e`.\n* Any subsequent edits made in `\u003cpath-to-your-evidence-project-root\u003e` should be reflected on the browser.\n* If you are using Windows without PowerShell, you will need to replace `$(pwd)` with the full path to your Evidence project root directory or `%cd%`\n\n#### Option 2: Work with an **existing Evidence** project\n```\n    cd \u003cpath-to-your-evidence-project-root\u003e\n    docker run -v=$(pwd):/evidence-workspace -p=3000:3000 -it --rm evidencedev/devenv:latest\n```\n\n* Make sure your project is in the allowed directory (https://docs.docker.com/desktop/settings-and-maintenance/settings/#virtual-file-shares)\n* In this case, `\u003cpath-to-your-evidence-project-root\u003e` should contain an Evidence project.\n* You should see your site up when you point your browser to `localhost:3000`. \n* Any edits made in `\u003cpath-to-your-evidence-project-root\u003e` should be reflected on the browser.\n* If you are using Windows without PowerShell, you will need to replace `$(pwd)` with the full path to your Evidence project root directory or `%cd%`\n\n##### Note for M1/M2 Mac Users using DuckDB\n* If you are using an ARM M1/M2 Mac (Late 2021 Macs and later), you will need to use the `--platform linux/amd64` flag to run the Evidence devenv container with either of the options above.  For instance:\n```\n    cd \u003cpath-to-your-evidence-project-root\u003e\n    docker run -v=$(pwd):/evidence-workspace -p=3000:3000 -it --rm --platform linux/amd64 evidencedev/devenv:latest\n```\n* Startup can be quite slow due to emulation. You may want to consider an alternative approach such as using Codespaces mentioned below.\n\n### Alternative Start Options\n\n#### Using a Script to Start the Docker Development Evironment\nIf you'd rather not type out the docker commands, you have the option of starting the devenv with a [script](./starting-with-script.md) detailed [here](./running-with-script.md).\n\n#### Running a Smaller Image\nIf you are not using DuckDB, and you have limited storage on your disk, you can use a smaller `devenv` image by replacing the `evidencedev/devenv:latest` image with `evidencedev/devenv-lite:latest` in the above commands.\n\n\n### Connecting to a Database from the Development Container\n* You can setup your DB connection as [documented](https://docs.evidence.dev/core-concepts/data-sources/). However there are few caveats to note when using the Evidence development environment container.\n    * If your database is hosted on your `host` machine, you'll have to ensure that the Database host is set to `host.docker.internal` either via the settings or your database config file (instead of `localhost`, `0.0.0.0`, etc).  For instance:\n    ```\n    {\n        \"host\": \"host.docker.internal\",\n        \"database\": \"yourDBname\",\n        \"port\": 5432,\n        \"user\": \"yourUsername\"\n    }\n    ```\n    * If your database is hosted externally (e.g on the cloud), you'll have to ensure your docker container has permissions to access the outside world.\n\n### Stopping the Running devenv container\n* Option 1: `docker ps` to list all running containers, and copy the container ID of the running Evidence development environment container, and then run `docker stop \u003ccontainer-id\u003e`.\n* Option 2: Use `Ctrl+C` to stop the running container on terminal.\n\n\n## Alternative to Using the Evidence Devenv\nGithub Codespaces are another way to setup an Evidence dev environment without installing `npm`, `node` etc.  See [Evidence installation docs](https://docs.evidence.dev/getting-started/install-evidence) for more information.\n\n## Development notes\nThis section only applies if you are contributing to this repo.\n\n### Testing the image locally\n```\ndocker build -t \u003ctest-image-name\u003e .\ncd \u003cpath-to-your-evidence-project-root\u003e\ndocker run -v=$(pwd):/evidence-workspace -p=3000:3000 -it --rm \u003ctest-image-name\u003e \u003ccommand-to-run\u003e\n```\n\n### Manually publishing the latest image to Docker Hub (Evidence team only)\nCurrently the image is hosted on Docker Hub and are re-built on pushes to main. To build and publish a new version manually, follow these steps\n1. Login to Docker Hub =\u003e `docker login`\n2. Build and push the image =\u003e `docker buildx build --platform linux/amd64,linux/arm64 -t evidencedev/devenv:latest . --push`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevidence-dev%2Fdocker-devenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevidence-dev%2Fdocker-devenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevidence-dev%2Fdocker-devenv/lists"}