{"id":20453472,"url":"https://github.com/sheroz/docker-rails","last_synced_at":"2026-04-10T04:41:42.133Z","repository":{"id":65073230,"uuid":"182174405","full_name":"sheroz/docker-rails","owner":"sheroz","description":"Ruby on Rails development using Docker","archived":false,"fork":false,"pushed_at":"2023-09-04T21:01:26.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-15T23:16:23.904Z","etag":null,"topics":["capistrano","development","development-environment","docker","linux","macos","mongodb","postgresql","pry","rails","redis","ruby","ruby-on-rails","sidekiq","windows"],"latest_commit_sha":null,"homepage":"https://sheroz.com/pages/blog/ruby-rails-windows-docker.html","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/sheroz.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":"2019-04-19T00:17:31.000Z","updated_at":"2023-11-15T13:08:50.000Z","dependencies_parsed_at":"2025-01-15T22:26:37.536Z","dependency_job_id":"6d686fbe-0993-4585-844a-969aef9612f9","html_url":"https://github.com/sheroz/docker-rails","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/sheroz%2Fdocker-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheroz%2Fdocker-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheroz%2Fdocker-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheroz%2Fdocker-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheroz","download_url":"https://codeload.github.com/sheroz/docker-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242005733,"owners_count":20056432,"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":["capistrano","development","development-environment","docker","linux","macos","mongodb","postgresql","pry","rails","redis","ruby","ruby-on-rails","sidekiq","windows"],"created_at":"2024-11-15T11:12:55.645Z","updated_at":"2025-12-30T19:45:26.955Z","avatar_url":"https://github.com/sheroz.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ruby on Rails Development on Windows using Docker (tested with Windows 10)\n\nThe brief description: [https://sheroz.com/pages/blog/ruby-rails-windows-docker.html](http://sheroz.com/pages/blog/ruby-rails-windows-docker.html)\n\n## Docker engine version: 18.09.2 (Docker Desktop for Windows)\n\n## 1. Set build parameters in the .env file\n## 2. Build containers\n\\\u003e docker-compose build\n## run containers in the background and leave them running\n\\\u003e docker-compose up -d\n## 3. Install bower\n\\\u003e docker-compose exec app bash\n\n$ sudo npm install bower -g\n## 4. Prepare directories\n$ sudo mkdir -p $BUNDLE_PATH\n\n$ sudo chown $HOST_USER:$HOST_USER $BUNDLE_PATH\n\n$ chmod 700 $BUNDLE_PATH\n\n$ sudo chmod 777 /opt/app\n\n## 5. Initial copy of source files into app directory\n$ cp -R /opt/src/. /opt/app\n## 6. Install bundler\n$ gem install bundler -v 1.17.0\n## 7. Install bundles (try bundle update if install doesn't work)\n$ bundle install\n## 8. Build assets\n$ rake bower:install['--allow-root']\n\n## Restore databases through rake aws:restore_db or other manual database restore scripts   \n\\\u003e docker-compose exec app bash\n\n$ rake aws:restore_db\n\n## Start rails \n\\\u003e docker-compose exec app bash\n\n$ rails s -b 0.0.0.0\n## Open host's browser at http://localhost:3000\n\n## Starting RSpec tests\n\\\u003e docker-compose exec app bash\n\n$ bundle exec rspec\n\n## Capistrano: Authentication \u0026 Authorisation configuratiom\nhttps://capistranorb.com/documentation/getting-started/authentication-and-authorisation/\n### Make sure that you have correct id_rsa settings in .env file\n### Copy your id_rsa key file to the SSH_PRIVATE_KEY location\n### Give to the id_rsa file required user ownership and permissions\n### Exit and re-enter to the app container \n\\\u003e docker-compose exec app bash\n\n$ sudo chown $HOST_USER:$HOST_USER $SSH_PRIVATE_KEY\n\n$ chmod 600 $SSH_PRIVATE_KEY\n\n$ exit\n\n### Capistrano: deploy\n\\\u003e docker-compose exec app bash\n\n$ cd /opt/src\n\n$ cap staging deploy\n### Capistrano: test github access\n$ ssh -vT git@github.com\n\n## Source / App files synchronization\n## File Watchers configuration for JetBrains IDEs:\n**File type:** Any\n\n**Scope:** Project files\n\n**Program:** C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker\n\n**Arguments:** cp $FilePath$ app:/opt/app/$FilePathRelativeToProjectRoot$\n\n**Working directory:** $ProjectFileDir$\n\n## Docker Engine configuration\nIn the General section of your Docker settings, turn on the Expose daemon on tcp://localhost:2375 without TLS option. \n\n## RubyMin IDE configuration\nhttps://www.jetbrains.com/help/ruby/settings-docker-tools.html\n\n## Solution to fix the error messages below - restart Docker after each reboot :) \nERROR: for app  Cannot start service app: driver failed programming external connectivity on endpoint (...)  Error starting userland proxy: (...)\n\n# Quick reference of docker commands:\n## run \u003ccommand\u003e inside the 'app' service\n\\\u003e docker-compose run --rm app \\\u003ccommand\\\u003e\n\n\\\u003e docker-compose run --rm app mc\n\n\\\u003e docker-compose run --rm app irb\n\n\\\u003e docker-compose run --rm app bundle install\n## Open a bash console inside the 'app' container\n\\\u003e docker run -it app bash\n\n\\\u003e docker run -it app mc\n \n\\\u003e docker run -it app irb \n## Show docker stats (analog of linux's top)\n\\\u003e docker stats\n## List containers\n\\\u003e docker-compose ps\n## List all containers\n\\\u003e docker ps -a\n## List services\n\\\u003e docker-compose ps --services\n## Delete all containers\n\\\u003e docker rm $(docker ps -a -q)\n## Show all images\n\\\u003e docker image ls -a\n## Delete all images\n\\\u003e docker rmi -f $(docker images -q)\n## Run services\n\\\u003e docker-compose up -d\n## Stop services\n\\\u003e docker-compose stop\n## Stop services and remove containers and networks\n\\\u003e docker-compose down\n## Stop services and remove ALL related containers, networks, images, and volumes \n\\\u003e docker-compose down --rmi all -v --remove-orphans\n## List docker volumes\n\\\u003e docker volume ls\n## Remove all unused volumes\n\\\u003e docker volume prune -f\n## Clean up everything - remove all images, containers, and networks\n\\\u003e docker system prune --volumes -af\n## Inspect running container\n\\\u003e docker inspect \\\u003ccontainer ID\\\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheroz%2Fdocker-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheroz%2Fdocker-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheroz%2Fdocker-rails/lists"}