Pocketbase docker that updates automatically to the latest version. Standard and Dokploy versions.
8.8K
I've created this auto-updating Docker image for PocketBase. The image is specifically designed for Dokploy deployments, as the current Dokploy templates for PocketBase weren't meeting my needs.
Pulling mussingtonr/pocketbase:latest will automatically retrieve the correct image for your architecture.
This image supports multiple architectures, so you can run it on various platforms:
linux/amd64 - x86-64linux/arm64 - ARM64linux/arm/v7 - ARMv7This Docker image is a build of pocketbase.io - Open Source backend for your next SaaS and Mobile app in 1 file.
Access the web UI at <your-ip>:8090, for more information check out PocketBase.
I've configured the image to support multiple directories that are mounted into the container. These folders are mapped to the root inside the container:
I've added support for several environment variables to make the image more configurable:
| Variable | Description | Required | Default |
|---|---|---|---|
POCKETBASE_ADMIN_EMAIL | Admin user email. When set with password, automatically creates or updates the admin user on startup | Optional | - |
POCKETBASE_ADMIN_PASSWORD | Admin user password | Optional | - |
POCKETBASE_ENCRYPTION_KEY | Encrypts application settings in the database (OAuth2 secrets, SMTP passwords, etc.) | Optional | - |
POCKETBASE_PORT | Server port number | Optional | 8090 |
POCKETBASE_DATA_DIR | Data directory path | Optional | /pb_data |
POCKETBASE_PUBLIC_DIR | Static files directory path | Optional | /pb_public |
POCKETBASE_MIGRATIONS_DIR | Migrations directory path | Optional | /pb_migrations |
POCKETBASE_HOOKS_DIR | Hooks directory path | Optional | /pb_hooks |
I've included a basic docker-compose.yml file for standard deployments:
services:
pocketbase:
image: mussingtonr/pocketbase:latest
container_name: pocketbase
restart: unless-stopped
ports:
- "8090:8090"
volumes:
- /path/to/data:/pb_data
- /path/to/public:/pb_public # Optional
- /path/to/migrations:/pb_migrations # Optional
- /path/to/hooks:/pb_hooks # Optional
environment:
- TZ=America/New_York
# Optional: Uncomment to auto-create admin user
# - [email protected]
# - POCKETBASE_ADMIN_PASSWORD=your-secure-password
# Optional: Uncomment to encrypt sensitive settings
# - POCKETBASE_ENCRYPTION_KEY=your-32-character-key
I've created a dedicated docker-compose.dokploy.yml template specifically for Dokploy deployments. This template uses Dokploy's standard volume path structure.
services:
pocketbase:
image: mussingtonr/pocketbase:latest
restart: unless-stopped
pull_policy: always
ports:
- "8090:8090"
volumes:
- ../files/pb_data:/pb_data
- ../files/pb_public:/pb_public
- ../files/pb_migrations:/pb_migrations
- ../files/pb_hooks:/pb_hooks
environment:
# Timezone configuration
- TZ=America/New_York
# Optional: Admin user credentials
# Uncomment and set these to automatically create/update an admin user
# - [email protected]
# - POCKETBASE_ADMIN_PASSWORD=your-secure-password-here
# Optional: Encryption key for securing settings in the database
# Generate a secure random key: openssl rand -base64 32
# - POCKETBASE_ENCRYPTION_KEY=your-encryption-key-here
The Docker image is automatically built daily via GitHub Actions. It always contains the latest PocketBase version. You don't need to manually check for updates - just pull the latest image.
This Docker image configuration is provided as-is. PocketBase itself is licensed under the MIT License.
Content type
Image
Digest
sha256:5397fa20d…
Size
16.2 MB
Last updated
4 months ago
docker pull mussingtonr/pocketbase