Skip to content

Instantly share code, notes, and snippets.

@sgelliott
Created March 3, 2017 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgelliott/191c681ebb261c6a36ecd5fb70eb0176 to your computer and use it in GitHub Desktop.
Save sgelliott/191c681ebb261c6a36ecd5fb70eb0176 to your computer and use it in GitHub Desktop.
Docker compose example using volumes out of Dockerfile build context
version: '3'
services:
webserver:
# using a custom image that we already bulit with 'docker build -t customimage .'
image: customimage
container_name: web
# we want to sync the REQUIRED cms-public repo root folder with the container's public folder for the rails app
volumes:
- ../cms-public:/usr/src/app/public
# expose ports for rails
ports:
- "3000:3000"
working_dir: /usr/src/app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment