From 16744bc78b2478fd77a55e58c63a3a77218cd8dd Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Thu, 7 Aug 2014 14:48:29 -0700 Subject: [PATCH 1/3] Switch to official images in readme Signed-off-by: Ben Firshman --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 924232185..f83e0a869 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Fast, isolated development environments using Docker. Define your app's environment with Docker so it can be reproduced anywhere: - FROM orchardup/python:2.7 + FROM python:2.7 ADD . /code WORKDIR /code RUN pip install -r requirements.txt @@ -25,7 +25,7 @@ web: - "8000:8000" - "49100:22" db: - image: orchardup/postgresql + image: postgres ``` (No more installing Postgres on your laptop!) From 796df302dde259fb3d964d3019ac96f73c7d9086 Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Thu, 7 Aug 2014 14:50:55 -0700 Subject: [PATCH 2/3] Use official images on getting started guide Signed-off-by: Ben Firshman --- docs/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index 4424c6655..7fb307ddf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -77,7 +77,7 @@ We define our Python dependencies in a file called `requirements.txt`: Next, we want to create a Docker image containing all of our app's dependencies. We specify how to build one using a file called `Dockerfile`: - FROM orchardup/python:2.7 + FROM python:2.7 ADD . /code WORKDIR /code RUN pip install -r requirements.txt @@ -96,17 +96,17 @@ We then define a set of services using `fig.yml`: links: - redis redis: - image: orchardup/redis + image: redis This defines two services: - `web`, which is built from `Dockerfile` in the current directory. It also says to run the command `python app.py` inside the image, forward the exposed port 5000 on the container to port 5000 on the host machine, connect up the Redis service, and mount the current directory inside the container so we can work on code without having to rebuild the image. - - `redis`, which uses the public image [orchardup/redis](https://index.docker.io/u/orchardup/redis/). + - `redis`, which uses the public image [redis](https://registry.hub.docker.com/_/redis/). Now if we run `fig up`, it'll pull a Redis image, build an image for our own code, and start everything up: $ fig up - Pulling image orchardup/redis... + Pulling image redis... Building web... Starting figtest_redis_1... Starting figtest_web_1... From 406425a6b9343a861a20f318aba86d51c2a48d6b Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Thu, 7 Aug 2014 14:54:59 -0700 Subject: [PATCH 3/3] Use official images in rails tutorial Signed-off-by: Ben Firshman --- docs/rails.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/rails.md b/docs/rails.md index 202267907..a4e950457 100644 --- a/docs/rails.md +++ b/docs/rails.md @@ -28,7 +28,7 @@ Next, we have a bootstrap `Gemfile` which just loads Rails. It'll be overwritten Finally, `fig.yml` is where the magic happens. It describes what services our app comprises (a database and a web app), how to get each one's Docker image (the database just runs on a pre-made PostgreSQL image, and the web app is built from the current directory), and the configuration we need to link them together and expose the web app's port. db: - image: orchardup/postgresql + image: postgres ports: - "5432" web: @@ -62,19 +62,18 @@ Now that we've got a new `Gemfile`, we need to build the image again. (This, and $ fig build -The app is now bootable, but we're not quite there yet. By default, Rails expects a database to be running on `localhost` - we need to point it at the `db` container instead. We also need to change the username and password to align with the defaults set by `orchardup/postgresql`. +The app is now bootable, but we're not quite there yet. By default, Rails expects a database to be running on `localhost` - we need to point it at the `db` container instead. We also need to change the database and username to align with the defaults set by the `postgres` image. Open up your newly-generated `database.yml`. Replace its contents with the following: development: &default adapter: postgresql encoding: unicode - database: myapp_development + database: postgres pool: 5 - username: docker - password: docker - host: <%= ENV.fetch('DB_1_PORT_5432_TCP_ADDR', 'localhost') %> - port: <%= ENV.fetch('DB_1_PORT_5432_TCP_PORT', '5432') %> + username: postgres + password: + host: db_1 test: <<: *default