Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 4a1419f

Browse files
committed
Only fetch v1 releases (alpine)
1 parent 544a465 commit 4a1419f

File tree

8 files changed

+329
-190
lines changed

8 files changed

+329
-190
lines changed

.github/workflows/external_trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fi
1919
echo "**** External trigger running off of alpine branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_DOCKER_COMPOSE_ALPINE\". ****"
2020
echo "**** Retrieving external version ****"
21-
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/docker/compose/releases/latest | jq -r '.tag_name')
21+
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/docker/compose/releases | jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name')
2222
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2323
echo "**** Can't retrieve external version, exiting ****"
2424
FAILURE_REASON="Can't retrieve external version for docker-compose branch alpine"

Dockerfile

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
ARG DOCKER_VERSION=19.03
1+
ARG DOCKER_VERSION=20.10.13
22

33
FROM docker:${DOCKER_VERSION} AS docker-cli
44

5-
FROM ghcr.io/linuxserver/baseimage-alpine:3.12 AS build
5+
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 AS build
66

77
ARG COMPOSE_VERSION
88

99
RUN \
10-
apk add --no-cache \
10+
apk -U --update --no-cache add \
1111
bash \
1212
build-base \
1313
ca-certificates \
1414
curl \
1515
gcc \
1616
git \
17+
jq \
1718
libc-dev \
1819
libffi-dev \
1920
libgcc \
@@ -28,41 +29,41 @@ RUN \
2829
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
2930

3031
RUN \
31-
mkdir -p /compose && \
32-
if [ -z ${COMPOSE_VERSION+x} ]; then \
33-
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \
34-
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
35-
fi && \
36-
git clone https://github.com/docker/compose.git && \
37-
cd /compose && \
38-
git checkout "${COMPOSE_VERSION}" && \
39-
pip3 install -U pip && \
40-
pip install -U --ignore-installed \
41-
virtualenv \
42-
tox && \
43-
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
44-
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
45-
tox --notest && \
46-
mkdir -p dist && \
47-
chmod 777 dist && \
48-
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
49-
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
50-
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
51-
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
52-
cd /tmp/pyinstaller/bootloader && \
53-
git checkout ${PYINSTVER} && \
54-
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
55-
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
56-
cd /compose && \
57-
export PATH="/compose/pyinstaller:${PATH}" && \
58-
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
59-
ls -la dist/ && \
60-
ldd dist/docker-compose && \
61-
mv dist/docker-compose /usr/local/bin && \
62-
docker-compose version
32+
mkdir -p /compose && \
33+
if [ -z ${COMPOSE_VERSION+x} ]; then \
34+
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases" \
35+
| jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name'); \
36+
fi && \
37+
git clone https://github.com/docker/compose.git && \
38+
cd /compose && \
39+
git checkout "${COMPOSE_VERSION}" && \
40+
pip3 install -U pip && \
41+
pip install -U --ignore-installed \
42+
virtualenv \
43+
tox && \
44+
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
45+
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
46+
tox --notest && \
47+
mkdir -p dist && \
48+
chmod 777 dist && \
49+
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
50+
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
51+
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
52+
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
53+
cd /tmp/pyinstaller/bootloader && \
54+
git checkout ${PYINSTVER} && \
55+
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
56+
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
57+
cd /compose && \
58+
export PATH="/compose/pyinstaller:${PATH}" && \
59+
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
60+
ls -la dist/ && \
61+
ldd dist/docker-compose && \
62+
mv dist/docker-compose /usr/local/bin && \
63+
docker-compose version
6364

6465
############## runtime stage ##############
65-
FROM ghcr.io/linuxserver/baseimage-alpine:3.12
66+
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
6667

6768
ARG BUILD_DATE
6869
ARG VERSION

Dockerfile.aarch64

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
ARG DOCKER_VERSION=19.03
1+
ARG DOCKER_VERSION=20.10.13
22

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

5-
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.12 AS build
5+
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 AS build
66

77
ARG COMPOSE_VERSION
88

99
RUN \
10-
apk add --no-cache \
10+
apk -U --update --no-cache add \
1111
bash \
1212
build-base \
1313
ca-certificates \
1414
curl \
1515
gcc \
1616
git \
17+
jq \
1718
libc-dev \
1819
libffi-dev \
1920
libgcc \
@@ -28,41 +29,41 @@ RUN \
2829
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
2930

3031
RUN \
31-
mkdir -p /compose && \
32-
if [ -z ${COMPOSE_VERSION+x} ]; then \
33-
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \
34-
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
35-
fi && \
36-
git clone https://github.com/docker/compose.git && \
37-
cd /compose && \
38-
git checkout "${COMPOSE_VERSION}" && \
39-
pip3 install -U pip && \
40-
pip install -U --ignore-installed \
41-
virtualenv \
42-
tox && \
43-
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
44-
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
45-
tox --notest && \
46-
mkdir -p dist && \
47-
chmod 777 dist && \
48-
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
49-
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
50-
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
51-
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
52-
cd /tmp/pyinstaller/bootloader && \
53-
git checkout ${PYINSTVER} && \
54-
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
55-
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
56-
cd /compose && \
57-
export PATH="/compose/pyinstaller:${PATH}" && \
58-
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
59-
ls -la dist/ && \
60-
ldd dist/docker-compose && \
61-
mv dist/docker-compose /usr/local/bin && \
62-
docker-compose version
32+
mkdir -p /compose && \
33+
if [ -z ${COMPOSE_VERSION+x} ]; then \
34+
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases" \
35+
| jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name'); \
36+
fi && \
37+
git clone https://github.com/docker/compose.git && \
38+
cd /compose && \
39+
git checkout "${COMPOSE_VERSION}" && \
40+
pip3 install -U pip && \
41+
pip install -U --ignore-installed \
42+
virtualenv \
43+
tox && \
44+
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
45+
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
46+
tox --notest && \
47+
mkdir -p dist && \
48+
chmod 777 dist && \
49+
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
50+
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
51+
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
52+
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
53+
cd /tmp/pyinstaller/bootloader && \
54+
git checkout ${PYINSTVER} && \
55+
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
56+
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
57+
cd /compose && \
58+
export PATH="/compose/pyinstaller:${PATH}" && \
59+
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
60+
ls -la dist/ && \
61+
ldd dist/docker-compose && \
62+
mv dist/docker-compose /usr/local/bin && \
63+
docker-compose version
6364

6465
############## runtime stage ##############
65-
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.12
66+
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15
6667

6768
ARG BUILD_DATE
6869
ARG VERSION

Dockerfile.armhf

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
ARG DOCKER_VERSION=19.03
1+
ARG DOCKER_VERSION=20.10.13
22

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

5-
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.12 AS build
5+
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 AS build
66

77
ARG COMPOSE_VERSION
88

99
RUN \
10-
apk add --no-cache \
10+
apk -U --update --no-cache add \
1111
bash \
1212
build-base \
1313
ca-certificates \
1414
curl \
1515
gcc \
1616
git \
17+
jq \
1718
libc-dev \
1819
libffi-dev \
1920
libgcc \
@@ -28,41 +29,41 @@ RUN \
2829
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
2930

3031
RUN \
31-
mkdir -p /compose && \
32-
if [ -z ${COMPOSE_VERSION+x} ]; then \
33-
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \
34-
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
35-
fi && \
36-
git clone https://github.com/docker/compose.git && \
37-
cd /compose && \
38-
git checkout "${COMPOSE_VERSION}" && \
39-
pip3 install -U pip && \
40-
pip install -U --ignore-installed \
41-
virtualenv \
42-
tox && \
43-
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
44-
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
45-
tox --notest && \
46-
mkdir -p dist && \
47-
chmod 777 dist && \
48-
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
49-
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
50-
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
51-
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
52-
cd /tmp/pyinstaller/bootloader && \
53-
git checkout ${PYINSTVER} && \
54-
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
55-
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
56-
cd /compose && \
57-
export PATH="/compose/pyinstaller:${PATH}" && \
58-
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
59-
ls -la dist/ && \
60-
ldd dist/docker-compose && \
61-
mv dist/docker-compose /usr/local/bin && \
62-
docker-compose version
32+
mkdir -p /compose && \
33+
if [ -z ${COMPOSE_VERSION+x} ]; then \
34+
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases" \
35+
| jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name'); \
36+
fi && \
37+
git clone https://github.com/docker/compose.git && \
38+
cd /compose && \
39+
git checkout "${COMPOSE_VERSION}" && \
40+
pip3 install -U pip && \
41+
pip install -U --ignore-installed \
42+
virtualenv \
43+
tox && \
44+
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
45+
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
46+
tox --notest && \
47+
mkdir -p dist && \
48+
chmod 777 dist && \
49+
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
50+
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
51+
PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \
52+
git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \
53+
cd /tmp/pyinstaller/bootloader && \
54+
git checkout ${PYINSTVER} && \
55+
/compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \
56+
/compose/.tox/${PY_ARG}/bin/pip3 install .. && \
57+
cd /compose && \
58+
export PATH="/compose/pyinstaller:${PATH}" && \
59+
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
60+
ls -la dist/ && \
61+
ldd dist/docker-compose && \
62+
mv dist/docker-compose /usr/local/bin && \
63+
docker-compose version
6364

6465
############## runtime stage ##############
65-
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.12
66+
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15
6667

6768
ARG BUILD_DATE
6869
ARG VERSION

0 commit comments

Comments
 (0)