Pulling jonas743/pocketbase:latest will automatically retrieve the appropriate image for your system architecture.
| Architecture | Supported |
|---|---|
| amd64 | ✅ |
| arm64 | ✅ |
This image offers multiple tags for different versions. Choose the appropriate tag for your use case and exercise caution when using unstable or development tags.
| Tag | Available | Description |
|---|---|---|
| latest | ✅ | Latest stable release of PocketBase |
| vX.X.X | ✅ | Specific patch release |
| vX.X | ✅ | Minor release |
| vX | ✅ | Major release |
Access the web UI at <your-ip>:8090. For more details, refer to the PocketBase Documentation.
Below are example configurations to get started with a PocketBase container.
services:
pocketbase:
image: jonas743/pocketbase:v0.24.2
container_name: pocketbase
restart: unless-stopped
command:
- --encryptionEnv # optional
- ENCRYPTION # optional
environment:
ENCRYPTION: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # optional (Ensure this is a 32-character long encryption key https://pocketbase.io/docs/going-to-production/#enable-settings-encryption)
ports:
- "8090:8090"
volumes:
- /etc/localtime:/etc/localtime:ro
- pocketbase_data:/pb_data
- pocketbase_public:/pb_public # optional
- pocketbase_hooks:/pb_hooks # optional
healthcheck: # optional, recommended since v0.10.0
test: wget --no-verbose --tries=1 --spider http://0.0.0.0:8090/api/health || exit 1
interval: 5s
timeout: 5s
retries: 5
volumes:
pocketbase_data:
pocketbase_public:
pocketbase_hooks:
docker run -d \
--name pocketbase \
--restart unless-stopped \
-e ENCRYPTION=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx `# optional` \
-p 8090:8090 \
-v /etc/localtime:/etc/localtime:ro \
-v pocketbase_data:/pb_data \
-v pocketbase_public:/pb_public `# optional` \
-v pocketbase_hooks:/pb_hooks `# optional` \
jonas743/pocketbase:v0.24.2 \
serve --encryptionEnv ENCRYPTION `# optional`
To build the image yourself, copy the Dockerfile and docker-compose.yml to your project directory. Update docker-compose.yml to build the image instead of pulling it:
# docker buildx build --platform linux/amd64,linux/arm64 --build-arg VERSION=0.24.2 -t jonas743/pocketbase:latest --push .
FROM alpine:latest AS builder
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
ARG VERSION
ENV BUILDX_ARCH="${TARGETOS:-linux}_${TARGETARCH:-amd64}${TARGETVARIANT}"
RUN apk add --no-cache wget unzip \
&& wget https://github.com/pocketbase/pocketbase/releases/download/v${VERSION}/pocketbase_${VERSION}_${BUILDX_ARCH}.zip \
&& unzip pocketbase_${VERSION}_${BUILDX_ARCH}.zip \
&& chmod +x /pocketbase
FROM alpine:latest
RUN apk add --no-cache ca-certificates
EXPOSE 8090
COPY --from=builder /pocketbase /usr/local/bin/pocketbase
ENTRYPOINT ["/usr/local/bin/pocketbase", "serve", "--http=0.0.0.0:8090", "--dir=/pb_data", "--publicDir=/pb_public", "--hooksDir=/pb_hooks"]
services:
pocketbase:
build:
context: .
args:
- VERSION=0.24.3 # Specify the PocketBase version here
container_name: pocketbase
restart: unless-stopped
command:
- --encryptionEnv # optional
- ENCRYPTION # optional
environment:
ENCRYPTION: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # optional (Ensure this is a 32-character long encryption key https://pocketbase.io/docs/going-to-production/#enable-settings-encryption)
ports:
- "8090:8090"
volumes:
- /etc/localtime:/etc/localtime:ro
- pocketbase_data:/pb_data
- pocketbase_public:/pb_public # optional
- pocketbase_hooks:/pb_hooks # optional
healthcheck: # optional, recommended since v0.10.0
test: wget --no-verbose --tries=1 --spider http://0.0.0.0:8090/api/health || exit 1
interval: 5s
timeout: 5s
retries: 5
volumes:
pocketbase_data:
pocketbase_public:
pocketbase_hooks:
You can also build it manually by using:
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 `#optional for multi-platform builds` \
--build-arg VERSION=0.24.2 `#pocketbase version here (without 'v')' \
-t <repository-name>:<tag> \
. `#reference to Dockerfile`
Content type
Image
Digest
sha256:bb22b46bf…
Size
17.9 MB
Last updated
over 1 year ago
docker pull jonas743/pocketbase