Skip to content

Commit 23b4c27

Browse files
committed
Add Docker usage instructions to README
1 parent b871a46 commit 23b4c27

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,30 @@ create table zipcodes (
105105
106106
Both `lat` and `lon`, geocodes, are populated for each zipcode record.
107107
108+
## Docker
109+
110+
If you prefer not to install Ruby locally, you can use Docker to generate the database.
111+
112+
**Build the image:**
113+
114+
```bash
115+
$ docker build -t free_zipcode_data .
116+
```
117+
118+
**Generate data for a single country:**
119+
120+
```bash
121+
$ docker run --rm -v $(pwd)/output:/output -e COUNTRY=US free_zipcode_data
122+
```
123+
124+
**Generate data for all countries:**
125+
126+
```bash
127+
$ docker run --rm -v $(pwd)/output:/output free_zipcode_data
128+
```
129+
130+
The SQLite database and CSV files will be written to the `./output/` directory on your host.
131+
108132
## Data License
109133
110134
The zipcode data is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>, carried forward from [GeoNames](http://www.geonames.org).<br />

0 commit comments

Comments
 (0)