2017-09-20 21:08:38 +01:00

39 lines
885 B
Docker
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM scratch
ADD rootfs.tar.xz /
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# build variables
ARG GOPATH=/tmp/golang
ARG MANIFEST_DIR=$GOPATH/src/github.com/estesp/manifest-tool
# install build packages
RUN \
apk add --no-cache --virtual=build-dependencies \
g++ \
gcc \
git \
go \
make && \
# install runtime packages
apk add --no-cache \
docker && \
# compile manifest-tool
git clone https://github.com/estesp/manifest-tool ${MANIFEST_DIR} && \
git -C $MANIFEST_DIR checkout $(git -C $MANIFEST_DIR describe --tags --candidates=1 --abbrev=0) && \
cd ${MANIFEST_DIR} && \
export PATH=$GOPATH/bin:$PATH && \
make binary && \
install -Dm755 \
${MANIFEST_DIR}/manifest-tool \
/usr/bin/manifest-tool && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*