{"id":18430981,"url":"https://github.com/me-io/docker-machine-dev-php","last_synced_at":"2025-06-13T04:03:18.507Z","repository":{"id":77516449,"uuid":"144704009","full_name":"me-io/docker-machine-dev-php","owner":"me-io","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-07T21:06:18.000Z","size":29,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-22T22:24:28.350Z","etag":null,"topics":["docker","docker-machine","php-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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/me-io.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-14T10:16:14.000Z","updated_at":"2021-01-08T21:10:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf25b895-d094-4578-a641-c37d69a23591","html_url":"https://github.com/me-io/docker-machine-dev-php","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/me-io%2Fdocker-machine-dev-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/me-io%2Fdocker-machine-dev-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/me-io%2Fdocker-machine-dev-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/me-io%2Fdocker-machine-dev-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/me-io","download_url":"https://codeload.github.com/me-io/docker-machine-dev-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247707356,"owners_count":20982769,"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-machine","php-docker"],"created_at":"2024-11-06T05:22:59.228Z","updated_at":"2025-04-07T18:32:14.985Z","avatar_url":"https://github.com/me-io.png","language":"Shell","readme":"# docker-medev-machine\n\n\u003e Development machine for the backend team\n\nWe use docker as our main development environment, it helps us maintain consistency between dev and production environments, if this is your first steps into docker world, please read this article about docker and how different it is from virtual machines and then come back and proceed.\n\n## 1. Installing the tools:\n* first you need to install Homebrew and Cask, you can do so by running following commands in sequence \n\n```\nxcode-select --install\nruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n\nbrew doctor //this is just to make sure Homebrew installed successfully\n\nbrew tap caskroom/cask\nbrew install cask\n```\n\n* Then you need to install virtualbox, since our docker's setup relies on a virtual machine that is powered by virtualbox,\nif you have it installed you can skip this step otherwise open up your terminal and run this command:\n```\nbrew cask install virtualbox\n```\n\n* Then install docker and its tools\nif you have it installed you can skip this step otherwise  run this command:\n```\nbrew install docker docker-compose docker-machine\n```\n\n* Then install docker credentials helper \nif you have it installed you can skip this step otherwise run this command:\n```\nbrew install docker-credential-helper\n```\n\n## 2. Prepare the workspace:\nTo create the workspace directory run the following command\n```\nmkdir ~/Workspace/medev\n```\nnow lets make sure that we have the write permission on the workspace\n```\nsudo chmod 777 ~/Workspace/medev\n```\nnow lets cd in\n```\ncd ~/Workspace/medev\n```\nnow lets clone the `medev-machine` repository\n```\ngit clone https://github.com/medev/medev-machine\n```\ncd to it \n```\ncd medev-machine\n```\n\n\u003e Make sure that you are on master branch\n\n\n## 3. Creating the virtual machine:\n\n* To create the virtual machine with the name `dev` using the following command\n```\ndocker-machine create --driver virtualbox --virtualbox-cpu-count 4 --virtualbox-memory \"8096\" --virtualbox-disk-size \"20000\" dev\n```\nnow lets make sure that the machine is running\n```\ndocker-machine start dev\n```\n\n* Now lets do some clean up and preparations for mounting the projects properly by running these commands one after another\n```\ndocker-machine stop dev\nVBoxManage sharedfolder remove dev --name Users\nVBoxManage sharedfolder add dev --name Users --hostpath /Users --automount\ndocker-machine start dev\n```\n\n* Now lets create the projects directories and mount them properly to NFS file system plus adding their DNS info to the hosts file\nthis can be done using the prepare.sh script, can be executed using the following command\n```\nsudo ./prepare.sh\n```\nto know your machine's ip address run the following command,\n```\ndocker-machine ip dev\n```\nif the ip doesn't equal to 192.168.99.100, it means that something went wrong, you have to start over, otherwise continue\n\n* Now you need to restart the virtual machine and remount the the project directories to the NFS\n```\ndocker-machine restart dev\nsudo ./prepare.sh\n```\n\n* If you already have a docker account you can skip signing up, otherwise got to [https://hub.docker.com](https://hub.docker.com) and create your account\nafter that run the following command and login with your credentials\n```\ndocker login\n```\n\nnow lets make sure that the the projects directories are mounted properly by running the script again\n```\nsudo ./prepare.sh\n```\n\n* Now lets prepare the env variables by running the below two commands one after another\n```\ndocker-machine env dev\neval \"$(docker-machine env dev)\"\n```\n\n* Final step is to start the container and the services with the following command \n```\ndocker-compose up -d\n```\n\n* To ssh into the machine use the following command\n```\nssh www-data@192.168.99.100 -p 2222\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fme-io%2Fdocker-machine-dev-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fme-io%2Fdocker-machine-dev-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fme-io%2Fdocker-machine-dev-php/lists"}