https://github.com/ghusta/docker-compose-simple-example
Simple example for docker-compose
https://github.com/ghusta/docker-compose-simple-example
docker docker-compose
Last synced: 4 months ago
JSON representation
Simple example for docker-compose
- Host: GitHub
- URL: https://github.com/ghusta/docker-compose-simple-example
- Owner: ghusta
- Created: 2018-04-13T11:44:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-19T15:04:41.000Z (about 7 years ago)
- Last Synced: 2025-01-06T22:36:02.018Z (5 months ago)
- Topics: docker, docker-compose
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple example for docker-compose
[](https://travis-ci.org/ghusta/docker-compose-simple-example)
## Overview
Simple example taken from [Get started with Docker Compose](https://docs.docker.com/compose/gettingstarted/).
It will build a local image based on _python:3.6-alpine_, and use another one which is _redis:alpine_.
## Usage
### Build
It will build local images only. The _redis_ image don't need to be built, it will be pulled from [Docker Hub](https://hub.docker.com/) (Docker public registry).
> docker-compose build
Tip :
If behind a proxy, add _build-arg_ like : `docker-compose build --build-arg https_proxy=ip:port`.
Indeed, the command `pip install -r requirements.txt` needs to fetch external resources for Python.### Run
It will run containers locally.
> docker-compose up -d
### Stop
It will stop the containers.
> docker-compose down
### Update images
In case some images needs to be refreshed, it will check for newer versions on Docker Hub.
> docker-compose pull