Skip to content

Instantly share code, notes, and snippets.

@RioChndr
Last active January 9, 2023 03:24
Show Gist options
  • Save RioChndr/5d65e6e151654aba19ea6ae1ce45e6aa to your computer and use it in GitHub Desktop.
Save RioChndr/5d65e6e151654aba19ea6ae1ce45e6aa to your computer and use it in GitHub Desktop.
docker oneliner shortcut

Docker shortcut

Create postgresql db

postgres docker image

docker run -d --name=postgresql -p 5432:5432 -v /var/lib/postgresql/data:/var/lib/postgresql/data \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=postgres \
postgres

other version : postgres:12.13-alpine, postgres:12-alpine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment