mirror of
https://github.com/napnap75/multiarch-docker-images.git
synced 2025-12-16 11:44:18 +01:00
Added IPFS
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
repository: [docker2mqtt, gandi, mopidy, piwigo-souvenirs, restic-auto, restic-rest, shairport-sync, slack-eraser, snapserver, telegraf]
|
repository: [docker2mqtt, gandi, mopidy, piwigo-souvenirs, restic-auto, restic-rest, shairport-sync, slack-eraser, snapserver, telegraf, go-ipfs, ipfs-cluster]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
61
go-ipfs/Dockerfile
Normal file
61
go-ipfs/Dockerfile
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
FROM golang:1.16.7-buster
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y libssl-dev ca-certificates fuse
|
||||||
|
|
||||||
|
ENV IPFS_VERSION v0.10.0
|
||||||
|
RUN set -eux; \
|
||||||
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
|
case "${dpkgArch##*-}" in \
|
||||||
|
"armhf") dpkgArch="arm" ;;\
|
||||||
|
esac; \
|
||||||
|
cd /tmp \
|
||||||
|
&& curl -L -s -o go-ipfs.tgz https://github.com/ipfs/go-ipfs/releases/download/$IPFS_VERSION/go-ipfs_${IPFS_VERSION}_linux-${dpkgArch}.tar.gz \
|
||||||
|
&& tar xzf go-ipfs.tgz \
|
||||||
|
&& curl -L -s -o container_daemon https://raw.githubusercontent.com/ipfs/go-ipfs/master/bin/container_daemon
|
||||||
|
|
||||||
|
ENV SUEXEC_VERSION v0.2
|
||||||
|
ENV TINI_VERSION v0.19.0
|
||||||
|
RUN set -eux; \
|
||||||
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
|
case "${dpkgArch##*-}" in \
|
||||||
|
"amd64" | "armhf" | "arm64") tiniArch="tini-static-$dpkgArch" ;;\
|
||||||
|
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
||||||
|
esac \
|
||||||
|
&& cd /tmp \
|
||||||
|
&& git clone https://github.com/ncopa/su-exec.git \
|
||||||
|
&& cd su-exec \
|
||||||
|
&& git checkout -q $SUEXEC_VERSION \
|
||||||
|
&& make su-exec-static \
|
||||||
|
&& cd /tmp \
|
||||||
|
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/$tiniArch \
|
||||||
|
&& chmod +x tini
|
||||||
|
|
||||||
|
# Now comes the actual target image, which aims to be as small as possible.
|
||||||
|
FROM busybox:1.31.1-glibc
|
||||||
|
|
||||||
|
COPY --from=0 /tmp/go-ipfs/ipfs /usr/local/bin/ipfs
|
||||||
|
COPY --from=0 /tmp/container_daemon /usr/local/bin/start_ipfs
|
||||||
|
COPY --from=0 /tmp/su-exec/su-exec-static /sbin/su-exec
|
||||||
|
COPY --from=0 /tmp/tini /sbin/tini
|
||||||
|
COPY --from=0 /bin/fusermount /usr/local/bin/fusermount
|
||||||
|
COPY --from=0 /etc/ssl/certs /etc/ssl/certs
|
||||||
|
|
||||||
|
RUN chmod 4755 /usr/local/bin/fusermount \
|
||||||
|
&& chmod 0755 /usr/local/bin/start_ipfs
|
||||||
|
|
||||||
|
COPY --from=0 /lib/*-linux-gnu*/libdl.so.2 /lib/
|
||||||
|
COPY --from=0 /usr/lib/*-linux-gnu*/libssl.so* /usr/lib/
|
||||||
|
COPY --from=0 /usr/lib/*-linux-gnu*/libcrypto.so* /usr/lib/
|
||||||
|
|
||||||
|
ENV IPFS_PATH /data/ipfs
|
||||||
|
RUN mkdir -p $IPFS_PATH \
|
||||||
|
&& adduser -D -h $IPFS_PATH -u 1000 -G users ipfs \
|
||||||
|
&& chown ipfs:users $IPFS_PATH \
|
||||||
|
&& mkdir /ipfs /ipns \
|
||||||
|
&& chown ipfs:users /ipfs /ipns
|
||||||
|
|
||||||
|
ENV IPFS_LOGGING ""
|
||||||
|
|
||||||
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/start_ipfs"]
|
||||||
|
|
||||||
|
CMD ["daemon", "--migrate=true"]
|
||||||
55
ipfs-cluster/Dockerfile
Normal file
55
ipfs-cluster/Dockerfile
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml
|
||||||
|
FROM golang:1.16.7-buster
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y libssl-dev ca-certificates fuse
|
||||||
|
|
||||||
|
ENV IPFS_CLUSTER_VERSION v0.14.1
|
||||||
|
RUN set -eux; \
|
||||||
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
|
case "${dpkgArch##*-}" in \
|
||||||
|
"armhf") dpkgArch="arm";; \
|
||||||
|
esac \
|
||||||
|
&& cd /tmp \
|
||||||
|
&& for BINARY in ipfs-cluster-ctl ipfs-cluster-follow ipfs-cluster-service ; do \
|
||||||
|
curl -L -s -o ${BINARY}.tgz https://dist.ipfs.io/${BINARY}/$IPFS_CLUSTER_VERSION/${BINARY}_${IPFS_CLUSTER_VERSION}_linux-${dpkgArch}.tar.gz; \
|
||||||
|
tar xzf ${BINARY}.tgz; \
|
||||||
|
done \
|
||||||
|
&& curl -L -s -o entrypoint.sh https://raw.githubusercontent.com/ipfs/ipfs-cluster/master/docker/entrypoint.sh
|
||||||
|
|
||||||
|
ENV SUEXEC_VERSION v0.2
|
||||||
|
ENV TINI_VERSION v0.19.0
|
||||||
|
RUN set -eux; \
|
||||||
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
|
case "${dpkgArch##*-}" in \
|
||||||
|
"amd64" | "armhf" | "arm64") tiniArch="tini-static-$dpkgArch" ;;\
|
||||||
|
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
||||||
|
esac; \
|
||||||
|
cd /tmp \
|
||||||
|
&& git clone https://github.com/ncopa/su-exec.git \
|
||||||
|
&& cd su-exec \
|
||||||
|
&& git checkout -q $SUEXEC_VERSION \
|
||||||
|
&& make su-exec-static \
|
||||||
|
&& cd /tmp \
|
||||||
|
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/$tiniArch \
|
||||||
|
&& chmod +x tini
|
||||||
|
|
||||||
|
# Now comes the actual target image, which aims to be as small as possible.
|
||||||
|
FROM busybox:1.31.1-glibc
|
||||||
|
|
||||||
|
COPY --from=0 /tmp/ipfs-cluster-ctl/ipfs-cluster-ctl /tmp/ipfs-cluster-follow/ipfs-cluster-follow /tmp/ipfs-cluster-service/ipfs-cluster-service /usr/local/bin/
|
||||||
|
COPY --from=0 /tmp/su-exec/su-exec-static /sbin/su-exec
|
||||||
|
COPY --from=0 /tmp/tini /sbin/tini
|
||||||
|
COPY --from=0 /bin/fusermount /usr/local/bin/fusermount
|
||||||
|
COPY --from=0 /etc/ssl/certs /etc/ssl/certs
|
||||||
|
|
||||||
|
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
|
||||||
|
ENV IPFS_CLUSTER_CONSENSUS crdt
|
||||||
|
ENV IPFS_CLUSTER_DATASTORE leveldb
|
||||||
|
|
||||||
|
RUN mkdir -p $IPFS_CLUSTER_PATH && \
|
||||||
|
adduser -D -h $IPFS_CLUSTER_PATH -u 1000 -G users ipfs && \
|
||||||
|
chown ipfs:users $IPFS_CLUSTER_PATH
|
||||||
|
|
||||||
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["daemon"]
|
||||||
Reference in New Issue
Block a user