Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,38 @@ ARG DOCKER_VERSION=19.03.8

FROM docker:${DOCKER_VERSION} AS docker-cli

FROM lsiobase/ubuntu:bionic AS build
FROM lsiobase/alpine:3.12 AS build

ARG COMPOSE_VERSION

RUN apt-get update && apt-get install --no-install-recommends -y \
RUN \
apk add --no-cache \
bash \
build-base \
ca-certificates \
curl \
gcc \
git \
libc-dev \
libffi-dev \
libgcc-6-dev \
libssl-dev \
libgcc \
make \
musl-dev \
openssl \
openssl-dev \
python3-dev \
python3-pip \
zlib1g-dev
py3-pip \
zlib-dev

COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker

RUN \
mkdir -p /compose && \
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='[""]'); \
| awk '/tag_name/{print $4;exit}' FS='[""]' | awk '$0="alpine-"$0'); \
fi && \
COMPOSE_VERSION=$(echo "$COMPOSE_VERSION" | sed 's|alpine-||') && \
git clone https://github.com/docker/compose.git && \
cd /compose && \
git checkout "${COMPOSE_VERSION}" && \
Expand All @@ -40,6 +46,13 @@ RUN \
chmod 777 dist && \
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
cd /tmp/pyinstaller/bootloader && \
git checkout $(PYINSTVER) && \
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
cd /compose && \
export PATH="/compose/pyinstaller:${PATH}" && \
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
ls -la dist/ && \
Expand All @@ -48,7 +61,7 @@ RUN \
docker-compose version

############## runtime stage ##############
FROM lsiobase/ubuntu:bionic
FROM lsiobase/alpine:3.12

ARG BUILD_DATE
ARG VERSION
Expand Down
31 changes: 22 additions & 9 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
ARG DOCKER_VERSION=19.03.8

FROM arm64v8/docker:${DOCKER_VERSION} AS docker-cli
FROM docker:${DOCKER_VERSION} AS docker-cli

FROM lsiobase/ubuntu:arm64v8-bionic AS build
FROM lsiobase/alpine:arm64v8-3.12 AS build

ARG COMPOSE_VERSION

RUN apt-get update && apt-get install --no-install-recommends -y \
RUN \
apk add --no-cache \
bash \
build-base \
ca-certificates \
curl \
gcc \
git \
libc-dev \
libffi-dev \
libgcc-6-dev \
libssl-dev \
libgcc \
make \
musl-dev \
openssl \
openssl-dev \
python3-dev \
python3-pip \
zlib1g-dev
py3-pip \
zlib-dev

COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker

RUN \
mkdir -p /compose && \
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='[""]'); \
| awk '/tag_name/{print $4;exit}' FS='[""]' | awk '$0="alpine-"$0'); \
fi && \
COMPOSE_VERSION=$(echo "$COMPOSE_VERSION" | sed 's|alpine-||') && \
git clone https://github.com/docker/compose.git && \
cd /compose && \
git checkout "${COMPOSE_VERSION}" && \
Expand All @@ -40,6 +46,13 @@ RUN \
chmod 777 dist && \
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
cd /tmp/pyinstaller/bootloader && \
git checkout $(PYINSTVER) && \
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
cd /compose && \
export PATH="/compose/pyinstaller:${PATH}" && \
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
ls -la dist/ && \
Expand All @@ -48,7 +61,7 @@ RUN \
docker-compose version

############## runtime stage ##############
FROM lsiobase/ubuntu:arm64v8-bionic
FROM lsiobase/alpine:arm64v8-3.12

ARG BUILD_DATE
ARG VERSION
Expand Down
31 changes: 22 additions & 9 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
ARG DOCKER_VERSION=19.03.8

FROM arm32v7/docker:${DOCKER_VERSION} AS docker-cli
FROM docker:${DOCKER_VERSION} AS docker-cli

FROM lsiobase/ubuntu:arm32v7-bionic AS build
FROM lsiobase/alpine:arm32v7-3.12 AS build

ARG COMPOSE_VERSION

RUN apt-get update && apt-get install --no-install-recommends -y \
RUN \
apk add --no-cache \
bash \
build-base \
ca-certificates \
curl \
gcc \
git \
libc-dev \
libffi-dev \
libgcc-6-dev \
libssl-dev \
libgcc \
make \
musl-dev \
openssl \
openssl-dev \
python3-dev \
python3-pip \
zlib1g-dev
py3-pip \
zlib-dev

COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker

RUN \
mkdir -p /compose && \
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='[""]'); \
| awk '/tag_name/{print $4;exit}' FS='[""]' | awk '$0="alpine-"$0'); \
fi && \
COMPOSE_VERSION=$(echo "$COMPOSE_VERSION" | sed 's|alpine-||') && \
git clone https://github.com/docker/compose.git && \
cd /compose && \
git checkout "${COMPOSE_VERSION}" && \
Expand All @@ -40,6 +46,13 @@ RUN \
chmod 777 dist && \
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
cd /tmp/pyinstaller/bootloader && \
git checkout $(PYINSTVER) && \
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
cd /compose && \
export PATH="/compose/pyinstaller:${PATH}" && \
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
ls -la dist/ && \
Expand All @@ -48,7 +61,7 @@ RUN \
docker-compose version

############## runtime stage ##############
FROM lsiobase/ubuntu:arm32v7-bionic
FROM lsiobase/alpine:arm32v7-3.12

ARG BUILD_DATE
ARG VERSION
Expand Down
Loading