Archived
1
0
Fork 0
This repository has been archived on 2024-01-27. You can view files and clone it, but cannot push or open issues or pull requests.
dockerfiles/pocketbase/Dockerfile
2022-07-23 12:45:12 +02:00

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" ]