{"id":18842054,"url":"https://github.com/overshard/dockerfiles","last_synced_at":"2025-05-12T21:02:46.226Z","repository":{"id":45083922,"uuid":"499723613","full_name":"overshard/dockerfiles","owner":"overshard","description":"All the Dockerfiles I use for various purposes. More detailed usage instructions are at the top of each Dockerfile.","archived":false,"fork":false,"pushed_at":"2025-03-01T16:33:52.000Z","size":60,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T03:35:32.034Z","etag":null,"topics":["alpine","archlinux","django","docker","docker-compose","docker-desktop","exim","postgresql","redis","webdev"],"latest_commit_sha":null,"homepage":"https://isaacbythewood.com","language":"Dockerfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/overshard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-06-04T04:25:38.000Z","updated_at":"2025-03-01T16:33:56.000Z","dependencies_parsed_at":"2024-11-08T02:53:37.961Z","dependency_job_id":"a02430ac-9bdf-4efc-9ebd-701fdfaf0485","html_url":"https://github.com/overshard/dockerfiles","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/overshard%2Fdockerfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overshard%2Fdockerfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overshard%2Fdockerfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overshard%2Fdockerfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/overshard","download_url":"https://codeload.github.com/overshard/dockerfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253823412,"owners_count":21969846,"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":["alpine","archlinux","django","docker","docker-compose","docker-desktop","exim","postgresql","redis","webdev"],"created_at":"2024-11-08T02:53:31.549Z","updated_at":"2025-05-12T21:02:46.174Z","avatar_url":"https://github.com/overshard.png","language":"Dockerfile","readme":"# dockerfiles\n\nAll the Dockerfiles I use for various purposes. More detailed usage instructions\nare at the top of each Dockerfile.\n\n\n## Methodology\n\nIn general I like to build all-in-one Dockerfiles for things like general\nsoftware development and I like to use docker-compose for production\nenvironments so that things like databases, caching, media storage, workers,\nand web hosts are split into their own containers.\n\n\n## Multiline\n\nI don't like having a lot of files that I `COPY` around and prefer writing\nmultiline echos and sed commands to create and adjust configuration files. When\nheredocs are widely supported and not just in labs I plan on using that.\n\n\n## Containers all the way down\n\nYou'll notice that I have some commands laying around that look something like:\n\n    docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock alpine \\\n      sh -c \"apk add docker curl \u0026\u0026 curl -o- https://raw.githubusercontent.com/overshard/dockerfiles/master/webdev/backup.sh | sh\"\n\nThis runs a docker container that then does a curl command to then run a script\nthat runs more docker containers. I like to keep all my scripts and code based\non containers and be as multi-platform as possible. I use Linux, MacOS, and\nWindows daily and the only way to make things work on all platforms is to just\nrun everything in containers and have docker installed everywhere.\n\nI also really don't like batch and powershell scripts on Windows and prefer to\njust use shell scripts for everything.\n\n\n## Quick container\n\nI sometimes setup a quick container to do test things on with:\n\n    docker run -td --restart unless-stopped --name alpine \\\n        -v \"/var/run/docker.sock:/var/run/docker.sock\" \\\n        alpine ash\n\nThen you can enter it at anytime with:\n\n    docker exec -it alpine ash\n\n\n## Backup volumes\n\nTo copy data from a container to the host system while using docker volumes you\ncan run something like this:\n\n    docker run --rm --volumes-from bythewood -v \"${pwd}:/data\" alpine \\\n        tar --exclude .venv --exclude node_modules --exclude media --exclude db.sqlite3 \\\n        -zcvf /data/bythewood-`date +%Y-%m-%d`.tar.gz /home/dev/.ssh /home/dev/code\n\n**NOTE:** Instead of using ${pwd} you can also use a full path, on Windows it'd\nlook something like `\"/C/Users/Isaac Bythewood/Documents/Backups:/data\"`. The\ndouble quotes are important to prevent errors and use spaces in the path.\n\n\n## Volume location on Windows\n\nYou can easily get to docker volumes on Windows by typing the following in\nExplorer:\n\n    \\\\wsl$\\docker-desktop-data\\data\\docker\\volumes\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovershard%2Fdockerfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovershard%2Fdockerfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovershard%2Fdockerfiles/lists"}