Skip to content

Boostrap projects with a Dockerfile and a folder structure that works.

License

Notifications You must be signed in to change notification settings

dsandip/quickstart-docker-git

 
 

Repository files navigation

quickstart-docker-git

Sometimes getting to a good docker based setup for your new project is a little too inconvenient.

This repository aims to maintain a collection of up-to-date quickstart base repos that will help you bootstrap your shiny new docker project.

Some examples:

What is included

Folders in this repo represent base repos for web frameworks, CMSs or databases.

  • Use docker build to build your own image
  • Initialise a git repo, and run git push to push to github that can be integrated with a docker hub's automated builds
  • Use docker run and get a running container. Basic configuration options are specified in docker-config.yaml.

What is NOT included

This is just a collection of quickstart repos. The idea is to modify the quickstart template as you need to get to a basic setup that works. Hence, this doesn't include things like setting up docker-compose files or more advanced framework specific configurations yet.

Repo Structure

Every base repo has the following structure:

/
--Dockerfile
--docker-config.yaml
--README.md
--app/

The README inside the base repo will contain further instructions.

How to use a base repo from this collection

To use any base-repo, do the following:

  • Clone this repo: git clone https://github.com/hasura/quickstart-docker-git

  • Copy the relevant base-repo: mv quickstart-docker-git/nodejs-express my-node-project git clone example

  • Initialize your own git repo inside this folder if you want: cd my-node-project && git init

  • Build and run your own docker image: docker build -t my-node-app . git clone example

  • Test if this app is working by making a request to the container, at '/'. curl example

git push your code as a service on the cloud

If you have gotten the base-repo of your choice to work on your machine, you may want to deploy your code as an API/service to the cloud. Using Hasura, you can do that with a simple git push command. Follow these instructions to get started:

Automated Docker hub builds

All base repos in this collection can readily be integrated to setup an automated docker image build system.

Read here for more details: https://docs.docker.com/docker-hub/github/

Contribution needed!

Please fork, file comments/bugs and submit your PRs! We've created a list of issues where active help is required: help-wanted.

Specifically,

  1. Add support for more frameworks
  2. Optimise Dockerfiles for faster builds, or for production (esp. for compiled languages)

Some important things to keep in mind when contributing:

  1. Expose only one port, and one data volume to help keep things simple
  2. Annotate the Dockerfile with comments where you expect users to modify
  3. Try to document the following major use cases when writing your README: docker build, git push based automated docker build, docker run

About

Boostrap projects with a Dockerfile and a folder structure that works.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 38.1%
  • Ruby 13.2%
  • HTML 12.7%
  • JavaScript 12.2%
  • C# 6.9%
  • Java 6.7%
  • Other 10.2%