Skip to content

Commit a39460d

Browse files
committed
Merge pull request #392 from bfirsh/more-official-images
More official images
2 parents 6ab084a + 406425a commit a39460d

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Fast, isolated development environments using Docker.
88

99
Define your app's environment with Docker so it can be reproduced anywhere:
1010

11-
FROM orchardup/python:2.7
11+
FROM python:2.7
1212
ADD . /code
1313
WORKDIR /code
1414
RUN pip install -r requirements.txt
@@ -25,7 +25,7 @@ web:
2525
- "8000:8000"
2626
- "49100:22"
2727
db:
28-
image: orchardup/postgresql
28+
image: postgres
2929
```
3030
3131
(No more installing Postgres on your laptop!)

docs/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ We define our Python dependencies in a file called `requirements.txt`:
7777

7878
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`:
7979

80-
FROM orchardup/python:2.7
80+
FROM python:2.7
8181
ADD . /code
8282
WORKDIR /code
8383
RUN pip install -r requirements.txt
@@ -96,17 +96,17 @@ We then define a set of services using `fig.yml`:
9696
links:
9797
- redis
9898
redis:
99-
image: orchardup/redis
99+
image: redis
100100

101101
This defines two services:
102102

103103
- `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.
104-
- `redis`, which uses the public image [orchardup/redis](https://index.docker.io/u/orchardup/redis/).
104+
- `redis`, which uses the public image [redis](https://registry.hub.docker.com/_/redis/).
105105

106106
Now if we run `fig up`, it'll pull a Redis image, build an image for our own code, and start everything up:
107107

108108
$ fig up
109-
Pulling image orchardup/redis...
109+
Pulling image redis...
110110
Building web...
111111
Starting figtest_redis_1...
112112
Starting figtest_web_1...

docs/rails.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Next, we have a bootstrap `Gemfile` which just loads Rails. It'll be overwritten
2828
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.
2929

3030
db:
31-
image: orchardup/postgresql
31+
image: postgres
3232
ports:
3333
- "5432"
3434
web:
@@ -62,19 +62,18 @@ Now that we've got a new `Gemfile`, we need to build the image again. (This, and
6262

6363
$ fig build
6464

65-
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`.
65+
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.
6666

6767
Open up your newly-generated `database.yml`. Replace its contents with the following:
6868

6969
development: &default
7070
adapter: postgresql
7171
encoding: unicode
72-
database: myapp_development
72+
database: postgres
7373
pool: 5
74-
username: docker
75-
password: docker
76-
host: <%= ENV.fetch('DB_1_PORT_5432_TCP_ADDR', 'localhost') %>
77-
port: <%= ENV.fetch('DB_1_PORT_5432_TCP_PORT', '5432') %>
74+
username: postgres
75+
password:
76+
host: db_1
7877

7978
test:
8079
<<: *default

0 commit comments

Comments
 (0)