{"id":15576218,"url":"https://github.com/ct83/ubuntu-docker-compose-starter-pack","last_synced_at":"2025-06-14T03:33:39.585Z","repository":{"id":107565060,"uuid":"212946803","full_name":"CT83/Ubuntu-Docker-Compose-Starter-Pack","owner":"CT83","description":"Starter pack to help creating Ubuntu Containers using Docker and Docker Compose easier. 🐳","archived":false,"fork":false,"pushed_at":"2019-10-05T13:06:59.000Z","size":4,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T02:34:35.767Z","etag":null,"topics":["docker","docker-compose","docker-compose-template","starter-kit","starter-template","ubuntu-container"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"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/CT83.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-10-05T05:05:25.000Z","updated_at":"2024-06-10T09:19:11.000Z","dependencies_parsed_at":"2023-06-08T12:30:12.584Z","dependency_job_id":null,"html_url":"https://github.com/CT83/Ubuntu-Docker-Compose-Starter-Pack","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/CT83%2FUbuntu-Docker-Compose-Starter-Pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CT83%2FUbuntu-Docker-Compose-Starter-Pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CT83%2FUbuntu-Docker-Compose-Starter-Pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CT83%2FUbuntu-Docker-Compose-Starter-Pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CT83","download_url":"https://codeload.github.com/CT83/Ubuntu-Docker-Compose-Starter-Pack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233283694,"owners_count":18652865,"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-compose","docker-compose-template","starter-kit","starter-template","ubuntu-container"],"created_at":"2024-10-02T18:43:48.798Z","updated_at":"2025-01-10T02:17:31.653Z","avatar_url":"https://github.com/CT83.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ubuntu-Docker-Compose-Starter-Pack\n\nRecently, I was trying to spin up a simple Ubuntu container. I noticed that a simple guide with some basic boilerplate code was too difficult to find. So, I wrote my own. \n\nView it on Github - [Ubuntu-Docker-Compose-Starter-Pack](https://github.com/CT83/Ubuntu-Docker-Compose-Starter-Pack)\n\n### 🐳 \n\nNote, this assumes that you have a gentle grasp of what Docker Compose and Containerization are, so stay put for the rodeo!\n\n#### Components\n\n1. Dockerfile\n2. Docker Compose Configuration\n3. Startup script\n\n#### 1. Dockerfile\n\nConsider this a recipe that tells Docker how the image needs to be assembled.\n\nRead More - [Here](https://docs.docker.com/engine/reference/builder/)\n\n```\nFROM ubuntu:latest\n\nCOPY . ./start_script.sh\nRUN [\"chmod\", \"+x\", \"start_script.sh\"]\n\nENTRYPOINT [\"sh\",\"./start_script.sh\"]\n```\n\nHere, we pull the latest ubuntu image from Docker Hub and copy over the startup script (and make it executable) which will be run when the container is initialized, more on this later. \n\n#### 2. Docker Compose Configuration\n\nA Docker Compose Configuration file or .yml file tells docker how many and what containers we are trying to spin up, what volumes need to be mounted and what environment variables need to be defined. \n\nRead More - [Here](https://docs.docker.com/compose/compose-file/)\n\n```\nversion: \"3.3\"\n\nservices:\n  hello_container:\n    container_name: hello_contaier\n    build: .\n\n    volumes:\n      - ./data:/mnt/data\n      - ./data2:/mnt/data2\n\n    environment:\n      SYS_NAME: good-container\n\nvolumes: \n  data :\n  data2 :\n```\n\nHere, we are declaring the container which we plan to use, it's name, volumes which we plan to mount and environment variables we want to use. \n\n#### 3. Startup Script\n\nThis is the file that will be run when the container is created, all the commands your servers, startup scripts should go in here. \n\n```\n#!/bin/bash\n\necho \"Hello World! This is the Ubuntu Container!\"\n```\n\n### That's it!\n\n#### Spinning up the containers\n\nOnce you have docker and docker-compose installed you can simply do\n\n`docker-compose up --build`\n\nto start everything!\n\nView it on Github - [Ubuntu-Docker-Compose-Starter-Pack](https://github.com/CT83/Ubuntu-Docker-Compose-Starter-Pack)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fct83%2Fubuntu-docker-compose-starter-pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fct83%2Fubuntu-docker-compose-starter-pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fct83%2Fubuntu-docker-compose-starter-pack/lists"}