Skip to content

Instantly share code, notes, and snippets.

@LargatSeif
Created April 17, 2024 10:55
Show Gist options
  • Save LargatSeif/30071da67e0a2e8cbea2032b6a6a672b to your computer and use it in GitHub Desktop.
Save LargatSeif/30071da67e0a2e8cbea2032b6a6a672b to your computer and use it in GitHub Desktop.
Pocketbase Dockerfile
FROM alpine:latest
ARG PB_VERSION=0.22.0
RUN apk add --no-cache \
unzip \
# thi is helpful for using scp to copy pb_data locally
openssh
# Download and unzip PocketBase
ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip
RUN unzip /tmp/pb.zip -d /pb/
# copy the local pb_migrations dir into the container
COPY ./pb_migrations /pb/pb_migrations
# copy the local pb_hooks dir into the container
COPY ./pb_hooks /pb/pb_hooks
EXPOSE 8080
# Start PocketBase
CMD ["/pb/pocketbase","serve","--http=0.0.0.0:8080"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment