Skip to content
Merged
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
14 changes: 1 addition & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,12 @@ ARG PB_VERSION=0.29.2

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 \
ca-certificates

# download and unzip PocketBase x86 64-bit
ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_${ARCH}.zip /tmp/pb.zip
ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_${TARGETARCH}.zip /tmp/pb.zip
RUN unzip /tmp/pb.zip -d /pb/

# uncomment to copy the local pb_migrations dir into the image
Expand Down