Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build-pocketbase-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
with:
images: docker.io/${{ vars.DOCKERHUB_USERNAME }}/pocketbase
tags: |
type=raw,value=${{ vars.PB_VERSION }}-${{ vars.AMD64 }}
type=raw,value=build-${{ github.run_number }}
type=raw,value=${{ vars.PB_VERSION }}
type=raw,value=latest
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -36,7 +38,7 @@ jobs:
uses: docker/build-push-action@v6
with:
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
build-args: |
ARCH=${{ vars.AMD64 }}
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/build-pocketbase-arm64.yml

This file was deleted.

15 changes: 14 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
FROM alpine:latest

ARG PB_VERSION=0.29.2
ARG ARCH=amd64

ARG TARGETARCH

# Set ARCH from TARGETARCH (default to amd64)
# Pocketbase uses "amd64" or "arm64" in their asset names
ARG ARCH
RUN if [ -z "$ARCH" ]; then \
case "$TARGETARCH" in \
amd64) export ARCH=amd64 ;; \
arm64) export ARCH=arm64 ;; \
*) echo "Unsupported arch: $TARGETARCH" && exit 1 ;; \
esac && \
echo "Detected ARCH=$ARCH"; \
fi

RUN apk add --no-cache \
unzip \
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
### Dockerized Pocketbase

This is my attempt at dockerizing pocketbase for linux/amd64
Unoffical Pocketbase Docker Container

This Repo sets up the Github Actions to build and deploy to Dockerhub the `azatecas/pocketbase` image.
I do not build pocketbase from scratch, but rather pull the official release from the original Pocketbase Repo and containarize it.

Suggested `docker-compose.yml` configuration

```yml
services:
pocketbase:
container_name: pocketbase
image: azatecas/pocketbase
restart: unless-stopped
environment:
ENCRYPTION: ${ENCRYPTION} # optional (Ensure this is a 32-character long encryption key https://pocketbase.io/docs/going-to-production/#enable-settings-encryption)
ports:
- "127.0.0.1:8080:8080"
volumes:
- ${COMMON_PATH}/pb_data:/pb/pb_data
- ${COMMON_PATH}/pb_public:/pb/pb_public # optional
- ${COMMON_PATH}/pb_hooks:/pb/pb_hooks # optional
healthcheck: # optional, recommended since v0.10.0
test: wget --no-verbose --tries=1 --spider http://localhost:8080/api/health || exit 1
interval: 60s
timeout: 5s
retries: 5
```
18 changes: 0 additions & 18 deletions docker-compose.yml

This file was deleted.