Tutorial by Examples

If you are running Docker on OS X or Windows, docker-compose should be included in your Docker for Windows or Docker Toolbox installation. On Linux you can get the latest binaries straight from the GitHub release page: https://github.com/docker/compose/releases You can install the specific releas...
This example comes from the official document. Suppose you have a python application using redis as backend. After writing Dockerfile, create a docker-compose.yml file like this: version: '2' services: web: build: . ports: - "5000:5000" volumes: - .:/code ...
docker-compose run service-name command If, for example, you wanted to run rake db:create in your web service, you'd use the following command: docker-compose run web rake db:create
Install Docker Engine. If you get a Permission denied error, Run sudo -i before the two commands below, then exit. Pull Docker Compose to /usr/local/bin/docker-compose. curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > /usr/loc...
A very basic docker-compose.yml looks like this: version: '2' services: hello_world: image: ubuntu command: [/bin/echo, 'Hello world'] This file is making it so that there's a hello_world service, that's initialized from the ubuntu:latest image and that, when it's run, it just runs...
If you want to use docker for rails app, and use database, you need to know that all the data in the docker container will be destroyed (unless you configure the container specifically for keeping data) Sometimes, you need to create a docker container with an application and attach it to an old con...

Page 1 of 1