Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Various commands to run on postcodes.io.db docker container
# Start docker container
docker run -p 5432:5432 -e POSTGRES_USER=postcodesio -e POSTGRES_DB=postcodesiodb -e POSTGRES_PASSWORD=password idealpostcodes/postcodes.io.db
# Generate postcode list
psql -h 0.0.0.0 -p 5432 --username postcodesio postcodesiodb -t -A -F"," -c "SELECT postcode FROM postcodes ORDER BY postcode" > postcodes.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment