Skip to content

Commit 5548d87

Browse files
committed
Expand Docker section in README with clone, output details, and country codes
1 parent c2a02ca commit 5548d87

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,27 +107,38 @@ Both `lat` and `lon`, geocodes, are populated for each zipcode record.
107107
108108
## Docker
109109
110-
If you prefer not to install Ruby locally, you can use Docker to generate the database.
110+
If you prefer not to install Ruby locally, you can use Docker to generate the database. You only need [Docker](https://docs.docker.com/get-docker/) installed.
111111
112-
**Build the image:**
112+
### Build the image
113113
114114
```bash
115+
$ git clone https://github.com/midwire/free_zipcode_data.git
116+
$ cd free_zipcode_data
115117
$ docker build -t free_zipcode_data .
116118
```
117119
118-
**Generate data for a single country:**
120+
### Generate data
121+
122+
Use the `COUNTRY` environment variable to specify a 2-letter country code. Omit it to process all available countries.
123+
124+
**Single country (e.g., US):**
119125
120126
```bash
121127
$ docker run --rm -v $(pwd)/output:/output -e COUNTRY=US free_zipcode_data
122128
```
123129
124-
**Generate data for all countries:**
130+
**All countries:**
125131
126132
```bash
127133
$ docker run --rm -v $(pwd)/output:/output free_zipcode_data
128134
```
129135
130-
The SQLite database and CSV files will be written to the `./output/` directory on your host.
136+
The following files will be written to the `./output/` directory on your host:
137+
138+
* `free_zipcode_data.sqlite3` - SQLite database with countries, states, counties, and zipcodes tables
139+
* `countries.csv`, `states.csv`, `counties.csv`, `zipcodes.csv` - CSV exports of each table
140+
141+
Look up supported country codes at [GeoNames](http://download.geonames.org/export/zip/).
131142
132143
## Data License
133144

0 commit comments

Comments
 (0)