Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to distribute docker-compose files?

Tags:

I've managed to create a docker-compose file which runs my application. Now I'm wondering if there's a standard way for distributing this file? I mean, with docker I would distribute the image uploaded to docker-hub built from my Dockerfile, can I also upload docker-compose files to docker-hub?

What would the deployment flow look like here?

like image 896
AbdurRehman Khan Avatar asked Mar 21 '19 05:03

AbdurRehman Khan


People also ask

Can you deploy Docker compose?

You can use Compose to deploy an app to a remote Docker host by setting the DOCKER_HOST , DOCKER_TLS_VERIFY , and DOCKER_CERT_PATH environment variables appropriately. See also Compose CLI environment variables.

How do you distribute Docker?

To share Docker images, you have to use a Docker registry. The default registry is Docker Hub and is where all of the images we've used have come from. A Docker ID allows you to access Docker Hub which is the world's largest library and community for container images. Create a Docker ID for free if you don't have one.

Can I have multiple Docker compose files?

Using Multiple Docker Compose Files Use multiple Docker Compose files when you want to change your app for different environments (e.g., dev, staging, and production) or when you want to run admin tasks against a Compose application.

Where should Docker compose files be stored?

The Compose file is a YAML file defining services, networks and volumes. The default path for a Compose file is ./docker-compose.yml .


1 Answers

You can deploy single images on DockerHub
You can't deploy a docker-compose file to DockerHub

The way that I saw the most is :

  • Creating a Github repository containing your project (with the docker-compose file)
  • Explaining how to create the different images in a Readme.md
  • Push each images on DockerHub and link your DockerHub images to your git repositories to allow people to check the whole stack.
like image 125
callmemath Avatar answered Oct 19 '22 17:10

callmemath