ARG ALPINE_VERSION=3.18.3 FROM alpine:${ALPINE_VERSION} AS build MAINTAINER "nulo " ARG PB_VERSION=0.18.8 RUN apk add --no-cache \ unzip \ ca-certificates 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/ FROM gitea.nulo.in/sutty/sutty:${ALPINE_VERSION} MAINTAINER "nulo " COPY --from=build /pb/pocketbase /usr/local/bin/pocketbase COPY 1687801090_sutty_initial_admin.js /pb/pb_migrations/ WORKDIR /pb VOLUME /pb/pb_data VOLUME /pb/pb_migrations CMD ["pocketbase", "serve", "--http=0.0.0.0:8080", "--automigrate"] EXPOSE 8080