Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Various commands to run on docker container
# Start docker container
docker run -p 5432:5432 -e POSTGRES_USER=postcodesio -e POSTGRES_DB=postcodesiodb -e POSTGRES_PASSWORD=password idealpostcodes/
# Generate postcode list
psql -h -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