add pocketbase
This commit is contained in:
parent
52d2352633
commit
b0345a54b1
1 changed files with 11 additions and 14 deletions
|
@ -1,20 +1,17 @@
|
|||
FROM alpine:3.17.3
|
||||
|
||||
ARG POCKETBASE_VERSION=0.15.2
|
||||
ARG PB_VERSION=0.15.2
|
||||
|
||||
RUN apk update && apk add curl wget unzip
|
||||
RUN addgroup -S pocketbase && adduser -S pocketbase -G pocketbase
|
||||
RUN wget https://github.com/pocketbase/pocketbase/releases/download/v${POCKETBASE_VERSION}/pocketbase_${POCKETBASE_VERSION}_linux_amd64.zip -O '/tmp/pocketbase.zip'
|
||||
RUN unzip /tmp/pocketbase.zip -d /usr/local/bin/
|
||||
RUN rm /tmp/pocketbase.zip
|
||||
RUN apk add --no-cache \
|
||||
unzip \
|
||||
ca-certificates
|
||||
|
||||
RUN mkdir /data
|
||||
RUN chown pocketbase:pocketbase /usr/local/bin/pocketbase
|
||||
RUN chown pocketbase:pocketbase /data
|
||||
RUN chmod 710 /usr/local/bin/pocketbase
|
||||
# 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/
|
||||
|
||||
VOLUME /data
|
||||
USER pocketbase
|
||||
EXPOSE 8090
|
||||
VOLUME /pb/pb_data
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/pocketbase", "serve", "--http=0.0.0.0:8090", "--dir=/data"]
|
||||
# start PocketBase
|
||||
CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8080"]
|
Loading…
Add table
Reference in a new issue