{"id":18972354,"url":"https://github.com/eis/amazon-ansible-docker","last_synced_at":"2026-04-07T11:30:15.100Z","repository":{"id":143010747,"uuid":"48758412","full_name":"eis/amazon-ansible-docker","owner":"eis","description":"Simple example to show Docker container usage in Amazon using Ansible.","archived":false,"fork":false,"pushed_at":"2015-12-29T17:35:53.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-01T08:21:16.460Z","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/eis.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}},"created_at":"2015-12-29T17:12:07.000Z","updated_at":"2015-12-29T17:25:53.000Z","dependencies_parsed_at":"2023-03-16T13:45:37.278Z","dependency_job_id":null,"html_url":"https://github.com/eis/amazon-ansible-docker","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/eis%2Famazon-ansible-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eis%2Famazon-ansible-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eis%2Famazon-ansible-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eis%2Famazon-ansible-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eis","download_url":"https://codeload.github.com/eis/amazon-ansible-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239970706,"owners_count":19727014,"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":[],"created_at":"2024-11-08T15:08:12.682Z","updated_at":"2026-04-07T11:30:15.037Z","avatar_url":"https://github.com/eis.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"amazon-ansible-docker\r\n=====================\r\n\r\nSimple example to show Docker container usage in Amazon\r\nusing Ansible.\r\n\r\nUses Vagrant box, having Ubuntu, locally. This local instance\r\ncan be then used to issue Ansible commands.\r\n\r\nAssumes amazon-testpair.pem in the local folder.\r\n\r\nInstall Docker to remote server\r\n--------------------------------\r\n```\r\nvagrant ssh\r\nansible all -m ping\r\nansible-galaxy install angstwad.docker_ubuntu\r\nansible-playbook /vagrant/ansible/docker.yml\r\n```\r\nRun Docker image locally\r\n------------------------\r\n```\r\nvagrant ssh\r\ndocker run -p 49160:8080 -d eis/node-web-app\r\ncurl -i localhost:49160\r\n# You should see \"Hello world\"\r\n```\r\nPush local Docker image to Amazon\r\n---------------------------------\r\nUploading ~700M takes up to 30 minutes on my machine!\r\n```\r\nvagrant ssh\r\ndocker save -o /tmp/node-image.tar eis/node-web-app\r\nscp -i ~/.ssh/amazon-testpair.pem /tmp/node-image.tar ubuntu@52.32.162.69:\r\nssh -i ~/.ssh/amazon-testpair.pem ubuntu@52.32.162.69\r\nsudo usermod -aG docker ubuntu # if not already done - solves connectivity thing\r\ndocker load -i node-image.tar\r\ndocker images\r\ndocker run -p 49160:8080 -d eis/node-web-app\r\n```\r\nBuild local Docker image in Amazon\r\n----------------------------------\r\n```\r\n# This method is to avoid slow transfer\r\n# Building takes about 2 minutes\r\n\r\nvagrant ssh\r\nscp -i ~/.ssh/amazon-testpair.pem /vagrant/node-app/* ubuntu@52.32.162.69:\r\nssh -i ~/.ssh/amazon-testpair.pem ubuntu@52.32.162.69\r\nsudo usermod -aG docker ubuntu # if not already done - solves connectivity thing\r\ndocker build -t eis/node-web-app .\r\ndocker run -p 49160:8080 -d eis/node-web-app\r\n\r\ncurl localhost:49160\r\n\r\n# Test below assumes security group allows the port to inbound traffic (TCP)\r\ncurl 52.32.162.69:49160\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feis%2Famazon-ansible-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feis%2Famazon-ansible-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feis%2Famazon-ansible-docker/lists"}