-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 764 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 764 Bytes
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
# syntax=docker/dockerfile:1
FROM alpine:3.20
# Build arguments
ARG POCKETBASE_VERSION=0.28.2
ARG TARGETOS=linux
ARG TARGETARCH=amd64
# Environment variables
ENV POCKETBASE_VERSION=${POCKETBASE_VERSION}
# Set working directory
WORKDIR /app
# Hadolint ignore=DL3018
RUN apk add --no-cache ca-certificates && \
wget -O pocketbase.zip "https://github.com/pocketbase/pocketbase/releases/download/v${POCKETBASE_VERSION}/pocketbase_${POCKETBASE_VERSION}_${TARGETOS}_${TARGETARCH}.zip" && \
unzip pocketbase.zip && \
rm pocketbase.zip && \
chmod +x pocketbase
# Copy hooks
COPY ./pb_hooks /app/pb_hooks
# Dokku-specific: Use $PORT environment variable
ENV PORT=5000
# Start Pocketbase
CMD ["sh", "-c", "/app/pocketbase serve --http=0.0.0.0:$PORT"]