Skip to content

gpyzy/rancher-compose-helloworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

rancher-compose-helloworld

This repository demos how to use rancher-compose to create a hello world container. the docker image that be used in this demo is from https://hub.docker.com/r/kitematic/hello-world-nginx

Option 1 - Use Docker Remote API in docker-compose.yml

In this link https://forums.rancher.com/t/rancher-compose-and-local-dockerfile-using-build/612 it describes how to use Docker Remote API in docker-compose and rancher-compose to create a container. This demo doesn't go with this solution. TODO - A seperate demo will be created and go with this solution.

Option 2 - use image parameter in docker-compose.yml

This demo goes with this solution

How do I

  1. Clone this repository
  2. in bash console, cd to the repository folder
  3. run rancher-compose --debug up -d

Learned things

  • If rancher-compose up is run successfully, rancher will create a service for you, named 'helloworld'. Then I tried change the local docker-compose file and the change didn't influence the subsequnt rancher-compose up command. I have to run rancher-compose rm helloworld to remove the existing service, and then your local docker-compose.yml will be used by rancher again.

  • I'm using MacOS to learn Rancher. By the time I do my learning, Docker for Mac doesn't support Rancher, but there is a workaround. Read the issue I submitted at rancher/rancher#9717 to find more detail; another issue is also FYI at rancher/rancher#9742

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published