Created
March 3, 2017 04:30
-
-
Save sgelliott/191c681ebb261c6a36ecd5fb70eb0176 to your computer and use it in GitHub Desktop.
Docker compose example using volumes out of Dockerfile build context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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