Skip to content

cotontigeh/pocketbase-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pocketbase docker

Just set of dockerfiles for pocketbase starting from 0.22 You can find hosted image on dockerhub

Dev commands

Build image

replace latest by any version you want

docker build -f dockerfiles/0.22-alpine3.20.dockerfile . -t your_namespace/pocketbase:latest

With args

docker build -f dockerfiles/0.22-alpine3.20.dockerfile . --build-arg MIGRATIONS_DIR=./pb_migrations --build-arg HOOKS_DIR=./pb_hooks -t your_namespace/pocketbase:latest
  • MIGRATIONS_DIR pocketbase migration directory, see the doc
  • HOOKS_DIR pocketbase hooks directory, see the doc

Start image

docker run -v ./pb_data:/pb/pb_data -p 8080:8080 -d your_namespace/pocketbase:latest

Start image with shared volumes

docker run -v ./pb_data:/pb/pb_data -v ./pb_hooks:/pb/pb_hooks -v ./pb_migrations:/pb/pb_migrations -p 8080:8080 -d your_namespace/pocketbase:latest

Publish to dockerhub

docker push your_namespace/pocketbase:0.22-alpine3.20