FROM alpine:3.20 AS download ARG PB_VERSION=0.40.3 RUN apk add --no-cache unzip curl ca-certificates RUN curl -Lo /tmp/pb.zip \ https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip \ && unzip /tmp/pb.zip -d /pb FROM alpine:3.20 AS runtime RUN apk add --no-cache ca-certificates wget WORKDIR /pb COPY --from=download /pb/pocketbase /usr/local/bin/pocketbase COPY pb_migrations ./pb_migrations COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh RUN chmod +x /usr/local/bin/docker-entrypoint.sh EXPOSE 8090 ENTRYPOINT ["docker-entrypoint.sh"] CMD ["pocketbase", "serve", "--http=0.0.0.0:8090"]