2016-11-09 20:33:23 +01:00
|
|
|
FROM alpine:latest
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2015-12-16 20:09:31 +01:00
|
|
|
|
2016-11-09 20:33:23 +01:00
|
|
|
RUN apk add --no-cache \
|
2015-12-16 20:09:31 +01:00
|
|
|
ca-certificates \
|
2016-08-12 20:09:30 +02:00
|
|
|
gnupg \
|
2015-12-16 20:09:31 +01:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-08-01 03:42:07 +02:00
|
|
|
ENV TARSNAP_VERSION 1.0.39
|
2015-12-16 20:09:31 +01:00
|
|
|
|
2016-11-09 20:33:23 +01:00
|
|
|
RUN set -x \
|
|
|
|
&& apk add --no-cache --virtual .build-deps \
|
|
|
|
build-base \
|
2015-12-16 20:09:31 +01:00
|
|
|
curl \
|
2016-11-09 20:33:23 +01:00
|
|
|
e2fsprogs-libs \
|
|
|
|
e2fsprogs-dev \
|
2015-12-16 20:09:31 +01:00
|
|
|
make \
|
2016-11-09 20:33:23 +01:00
|
|
|
openssl-dev \
|
|
|
|
perl-digest-sha1 \
|
2017-05-30 21:09:02 +02:00
|
|
|
perl-utils \
|
2016-11-09 20:33:23 +01:00
|
|
|
tar \
|
|
|
|
zlib-dev \
|
2015-12-16 20:09:31 +01:00
|
|
|
&& curl -sSL "https://www.tarsnap.com/download/tarsnap-autoconf-${TARSNAP_VERSION}.tgz" -o /tmp/tarsnap.tgz \
|
|
|
|
&& curl -sSL "https://www.tarsnap.com/download/tarsnap-sigs-${TARSNAP_VERSION}.asc" -o /tmp/tarsnap.tgz.asc \
|
2016-12-02 21:02:40 +01:00
|
|
|
&& curl -sSL "https://www.tarsnap.com/tarsnap-signing-key-2015.asc" | gpg --no-tty --import \
|
2015-12-16 20:09:31 +01:00
|
|
|
&& sha=$(gpg --decrypt /tmp/tarsnap.tgz.asc | awk '{ print $4 }') \
|
|
|
|
&& if [ "$sha" != "$(shasum -a 256 /tmp/tarsnap.tgz | awk '{ print $1 }')" ]; then exit 1; fi \
|
|
|
|
&& mkdir -p /usr/src/tarsnap \
|
|
|
|
&& tar -xzf /tmp/tarsnap.tgz -C /usr/src/tarsnap --strip-components 1 \
|
|
|
|
&& rm /tmp/tarsnap.tgz* \
|
2016-11-09 20:33:23 +01:00
|
|
|
&& ( \
|
|
|
|
cd /usr/src/tarsnap \
|
|
|
|
&& ./configure --prefix=/usr \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
) \
|
2015-12-16 20:09:31 +01:00
|
|
|
&& rm -rf /usr/src/tarsnap \
|
2016-11-09 20:33:23 +01:00
|
|
|
&& apk del .build-deps
|
2015-12-16 20:09:31 +01:00
|
|
|
|
2016-11-09 20:33:23 +01:00
|
|
|
ENTRYPOINT [ "tarsnap" ]
|
|
|
|
CMD [ "--help" ]
|