piframe/piframefleet/Dockerfile

60 lines
1.7 KiB
Docker

FROM alpine:latest
WORKDIR /opt/
# need to figure out if arm64/arm64 32bit multilib/arm
COPY piframefleet/arch_detect.sh /opt/
# Copy ansible samples -> /opt
COPY ansible /opt/
# Install and base setup all the things
RUN apk upgrade --update --no-cache && \
apk add python3 curl jq bash unzip && \
ARCH=$(/opt/arch_detect.sh); \
echo "**** Detected arch: $ARCH ****" && \
S6_RELEASE=$(curl -sX GET "https://api.github.com/repos/just-containers/s6-overlay/tags" \
| jq -r .[0].name); \
echo "**** s6-overlay release: ${S6_RELEASE} ****" && \
echo "**** Installing s6-overlay ****" && \
curl -L https://github.com/just-containers/s6-overlay/releases/latest/download/s6-overlay-${ARCH}.tar.gz \
-o /opt/s6-overlay.tar.gz && \
tar xzf /opt/s6-overlay.tar.gz -C / && \
echo "**** wireguard ****" && \
apk add wireguard-tools && \
echo "**** syncthing ****" && \
apk add syncthing && \
echo "**** rclone ****" && \
curl https://rclone.org/install.sh | bash && \
echo "**** filebrowser ****" && \
curl -fsSL https://filebrowser.org/get.sh | bash && \
echo "**** ansible ****" && \
apk add ansible ansible-lint ansible-doc && \
ansible-galaxy install githubixx.ansible_role_wireguard && \
echo "**** cleanup ****" && \
rm /opt/s6-overlay.tar.gz && \
rm -rf /var/cache/apk/*
ADD /piframefleet/root/ /
# Wireguard related 'stuff'
ENV ENABLE_WIREGUARD=false
EXPOSE 51820/udp
VOLUME /lib/modules
# SyncThing related 'stuff'
ENV ENABLE_SYNCTHING=false
EXPOSE 8384/tcp
EXPOSE 22000/tcp
# FileBrowser related 'stuff'
ENV ENABLE_FILEBROWSER=false
EXPOSE 9191/tcp
VOLUME /opt/filebrowser
# General 'stuff'
VOLUME /opt/pictures
# Run s6-overlay as the init so we get services and similar
ENTRYPOINT [ "/init" ]