forked from sonyarianto/pocketbase-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (21 loc) · 839 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# syntax=docker/dockerfile:1
FROM alpine:latest AS builder
ARG POCKETBASE_VERSION=0.22.7
RUN apk add --no-cache \
ca-certificates \
unzip
ADD https://github.com/pocketbase/pocketbase/releases/download/v${POCKETBASE_VERSION}/pocketbase_${POCKETBASE_VERSION}_linux_amd64.zip /tmp/pocketbase.zip
RUN unzip /tmp/pocketbase.zip -d /tmp/pocketbase
RUN chmod +x /tmp/pocketbase/pocketbase
#############################################
# Final image
#############################################
FROM alpine:latest
LABEL maintainer="Sony AK <[email protected]>"
WORKDIR /app/pocketbase
COPY --from=builder /tmp/pocketbase .
ENV DATA_DIR=/app/data/pb_data
ENV PUBLIC_DIR=/app/data/pb_public
ENV PORT=8090
EXPOSE ${PORT}
CMD [ "sh", "-c", "./pocketbase serve --http=0.0.0.0:${PORT} --dir=${DATA_DIR} --publicDir=${PUBLIC_DIR}" ]