Skip to content

Latest commit

 

History

History

pocketbase

Docker Pulls Docker Stars Image Size GitHub issues by-label

Unofficial PocketBase SaaS backend prepared for secure kubernetes deployment

PocketBase Kubernetes-ready OCI

PocketBase is an open-source backend consisting of an embedded database (SQLite) with real-time subscriptions, and built-in auth management, convenient dashboard UI and simple REST-ish API. This image provides PocketBase in a secure Kubernetes-ready manner using Alpine and non-root user.

PocketBase does not have a High-Availability or Horizontal scaling supported, therefore the main use-case here is to deploy a single container besides your application and use it as your lightweight SaaS backend.

Features

  • Multi-arch image for x86 and ARM environments
  • Non-root user to mitigate potential vulnerabilities
  • Shared data path through environment variables
  • Automatic encryption secret generation

Quick start

Quick Start Intro

Docker-Compose (recommended):

version: "3.8"
services:
  pocketbase:
    image: adaliszk/pocketbase
    ports:
      - "8080:8080"

or Docker CLI:

docker run -p 8080:8080 adaliszk/pocketbase

Supported Architectures

The image utilises the docker manifest for multi-platform awareness, therefore, the main tags will retrieve the correct platform image without needing to specify your platform.

Architecture Available Tag
x86-64 <version> or latest
arm64 <version> or latest
arm/v7 <version> or latest

Version Tags

The tags are automatically generated when

Tag Available Description
latest The latest version with multi-arch support
0.12.3 PocketBase v0.12.3 with multi-arch support
0.12.2 PocketBase v0.12.2 with multi-arch support
0.11.3 PocketBase v0.11.3 with multi-arch support
develop Automatic build from GitHub that links the source on Dockerhub

Configuration

The image uses the PocketBase binary as its entrypoint with a slight layer in front that allows a couple of variables to be set instead of command-line arguments:

Variable Overwrites Default
DATA_DIR --dir /data/database
MIGRATION_DIR --migrationDir /data/migration
PUBLIC_DIR --publicDir /data/static

By default, the serve command will be executed with --http=0.0.0.0:8080 arguments.

Persisted Data

As described above, all data is configured to exist under /data; therefore, to persist them, you need to attach a volume to that location:

docker create volume pocketbase_data
docker run -p 8080:8080 -v pocketbase_data:/data adaliszk/pocketbase

or

version: "3.8"
volumes:
  data: { }
services:
  pocketbase:
    image: adaliszk/pocketbase
    volumes:
      - data:/data
    ports:
      - "8080:8080"