2019-06-03 01:14:40 +00:00
|
|
|
FROM lsiobase/ubuntu:arm32v7-bionic as buildstage
|
|
|
|
|
|
|
|
ARG COMPOSE_VERSION
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
echo "**** install packages ****" && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y \
|
|
|
|
git \
|
|
|
|
libffi-dev \
|
2019-11-19 11:56:30 +00:00
|
|
|
libssl-dev \
|
2019-06-03 01:14:40 +00:00
|
|
|
python3 \
|
2020-02-07 22:57:52 +00:00
|
|
|
python3-dev \
|
2019-06-03 01:14:40 +00:00
|
|
|
python3-pip \
|
|
|
|
zlib1g-dev
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
echo "**** build compose ****" && \
|
|
|
|
cd /tmp && \
|
|
|
|
if [ -z ${COMPOSE_VERSION+x} ]; then \
|
|
|
|
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \
|
|
|
|
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
|
|
|
fi && \
|
|
|
|
git clone https://github.com/docker/compose.git && \
|
|
|
|
cd compose && \
|
|
|
|
git checkout ${COMPOSE_VERSION} && \
|
|
|
|
pip3 install \
|
|
|
|
pyinstaller && \
|
|
|
|
pip3 install \
|
|
|
|
-r requirements.txt \
|
|
|
|
-r requirements-build.txt && \
|
2019-11-19 10:50:51 +00:00
|
|
|
./script/build/write-git-sha > compose/GITSHA && \
|
2019-06-03 01:14:40 +00:00
|
|
|
pyinstaller docker-compose.spec && \
|
|
|
|
mv dist/docker-compose /
|
|
|
|
|
|
|
|
# runtime stage
|
|
|
|
FROM lsiobase/cloud9:arm32v7-latest
|
|
|
|
|
|
|
|
# set version label
|
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG VERSION
|
|
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
|
|
LABEL maintainer="thelamer"
|
|
|
|
|
|
|
|
# Docker compose
|
|
|
|
COPY --from=buildstage /docker-compose /usr/local/bin/
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
echo "**** install docker deps ****" && \
|
|
|
|
curl -s \
|
2020-02-07 22:57:52 +00:00
|
|
|
https://download.docker.com/linux/debian/gpg | \
|
|
|
|
apt-key add - && \
|
2019-06-03 01:51:29 +00:00
|
|
|
echo 'deb [arch=armhf] https://download.docker.com/linux/ubuntu bionic stable' > \
|
2020-02-07 22:57:52 +00:00
|
|
|
/etc/apt/sources.list.d/docker-ce.list && \
|
2019-06-03 01:14:40 +00:00
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2020-02-07 22:57:52 +00:00
|
|
|
docker-ce && \
|
2019-06-03 01:14:40 +00:00
|
|
|
echo "**** Cleanup and user perms ****" && \
|
|
|
|
apt-get autoclean && \
|
|
|
|
rm -rf \
|
2020-02-07 22:57:52 +00:00
|
|
|
/var/lib/apt/lists/* \
|
|
|
|
/var/tmp/* \
|
|
|
|
/tmp/*
|