Skip to content

Commit

Permalink
add spiped 1.6-alpine
Browse files Browse the repository at this point in the history
Signed-off-by: yzewei <[email protected]>
  • Loading branch information
yzewei committed Jun 26, 2024
1 parent 8fcf70d commit a76e6a9
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
35 changes: 35 additions & 0 deletions library/spiped/1.6-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM lcr.loongnix.cn/library/alpine:3.19

LABEL maintainer="[email protected]"

RUN set -x \
&& addgroup -S spiped \
&& adduser -S -G spiped spiped

ENV SPIPED_VERSION=1.6.1 SPIPED_DOWNLOAD_SHA256=8d7089979db79a531a0ecc507b113ac6f2cf5f19305571eff1d3413e0ab33713

RUN set -x \
&& apk add --no-cache --virtual .build-deps \
curl \
gcc \
make \
musl-dev \
openssl-dev \
tar \
&& curl -fsSL "https://www.tarsnap.com/spiped/spiped-$SPIPED_VERSION.tgz" -o spiped.tar.gz \
&& echo "$SPIPED_DOWNLOAD_SHA256 *spiped.tar.gz" |sha256sum -c - \
&& mkdir -p /usr/local/src/spiped \
&& tar xzf "spiped.tar.gz" -C /usr/local/src/spiped --strip-components=1 \
&& rm "spiped.tar.gz" \
&& CC=gcc make -C /usr/local/src/spiped \
&& make -C /usr/local/src/spiped install \
&& rm -rf /usr/local/src/spiped \
&& apk del .build-deps

VOLUME /spiped
WORKDIR /spiped

COPY *.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]

CMD ["spiped"]
19 changes: 19 additions & 0 deletions library/spiped/1.6-alpine/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file is generated by the template.

REGISTRY?=lcr.loongnix.cn
ORGANIZATION?=library
REPOSITORY?=spiped
TAG?=1.6-alpine

IMAGE=$(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):$(TAG)


default: image

image:
docker build \
-t $(IMAGE) \
.

push:
docker push $(IMAGE)
8 changes: 8 additions & 0 deletions library/spiped/1.6-alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -e

case "$1" in
-*) set -- spiped -k /spiped/key -F "$@" ;;
esac

exec "$@"
3 changes: 3 additions & 0 deletions library/spiped/1.6-alpine/spiped-generate-key.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
umask 0077
dd if=/dev/urandom bs=32 count=1 of=/spiped/key/spiped-keyfile

0 comments on commit a76e6a9

Please sign in to comment.