28 lines
799 B
Docker
28 lines
799 B
Docker
FROM alpine:latest
|
|
LABEL maintainer "J. Elfring <code@elfring.ms>"
|
|
|
|
RUN apk add --no-cache \
|
|
ca-certificates \
|
|
curl \
|
|
unzip
|
|
|
|
RUN mkdir /app \
|
|
&& mkdir /data \
|
|
&& chown daemon /data \
|
|
&& downloadurl=$(curl -s https://api.github.com/repos/pocketbase/pocketbase/releases/latest \
|
|
| grep "browser_download_url" \
|
|
| grep "linux_amd64" \
|
|
| cut -d : -f 2,3 \
|
|
| tr -d '\" ' ) \
|
|
&& curl --location --silent --output /tmp/pocketbase.zip \
|
|
$downloadurl \
|
|
&& unzip -d /app /tmp/pocketbase.zip \
|
|
&& rm /tmp/pocketbase.zip \
|
|
&& chmod +x /app/pocketbase
|
|
ADD ./pocketbase.sh /app
|
|
|
|
VOLUME /data
|
|
USER daemon
|
|
EXPOSE 8090
|
|
|
|
CMD [ "/bin/sh", "/app/pocketbase.sh" ]
|