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

Commit 8ceb1a1

Browse files
authored
Only fetch v1 releases (#31)
1 parent 7c4cd0a commit 8ceb1a1

File tree

8 files changed

+302
-181
lines changed

8 files changed

+302
-181
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 master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_DOCKER_COMPOSE_MASTER\". ****"
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 master"

Dockerfile

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
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-ubuntu:bionic AS build
5+
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal AS build
66

77
ARG COMPOSE_VERSION
88

99
RUN apt-get update && apt-get install --no-install-recommends -y \
1010
curl \
1111
gcc \
1212
git \
13+
jq \
1314
libc-dev \
1415
libffi-dev \
15-
libgcc-6-dev \
16+
libgcc-10-dev \
1617
libssl-dev \
1718
make \
1819
openssl \
@@ -23,34 +24,34 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
2324
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
2425

2526
RUN \
26-
mkdir -p /compose && \
27-
if [ -z ${COMPOSE_VERSION+x} ]; then \
28-
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \
29-
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
30-
fi && \
31-
git clone https://github.com/docker/compose.git && \
32-
cd /compose && \
33-
git checkout "${COMPOSE_VERSION}" && \
34-
pip3 install -U pip && \
35-
pip install -U --ignore-installed \
36-
virtualenv \
37-
tox && \
38-
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
39-
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
40-
tox --notest && \
41-
mkdir -p dist && \
42-
chmod 777 dist && \
43-
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
44-
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
45-
export PATH="/compose/pyinstaller:${PATH}" && \
46-
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
47-
ls -la dist/ && \
48-
ldd dist/docker-compose && \
49-
mv dist/docker-compose /usr/local/bin && \
50-
docker-compose version
27+
mkdir -p /compose && \
28+
if [ -z ${COMPOSE_VERSION+x} ]; then \
29+
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases" \
30+
| jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name'); \
31+
fi && \
32+
git clone https://github.com/docker/compose.git && \
33+
cd /compose && \
34+
git checkout "${COMPOSE_VERSION}" && \
35+
pip3 install -U pip && \
36+
pip install -U --ignore-installed \
37+
virtualenv \
38+
tox && \
39+
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
40+
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
41+
tox --notest && \
42+
mkdir -p dist && \
43+
chmod 777 dist && \
44+
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
45+
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
46+
export PATH="/compose/pyinstaller:${PATH}" && \
47+
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
48+
ls -la dist/ && \
49+
ldd dist/docker-compose && \
50+
mv dist/docker-compose /usr/local/bin && \
51+
docker-compose version
5152

5253
############## runtime stage ##############
53-
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
54+
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
5455

5556
ARG BUILD_DATE
5657
ARG VERSION

Dockerfile.aarch64

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
ARG DOCKER_VERSION=19.03
1+
ARG DOCKER_VERSION=20.10.13
22

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

5-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic AS build
5+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal AS build
66

77
ARG COMPOSE_VERSION
88

99
RUN apt-get update && apt-get install --no-install-recommends -y \
1010
curl \
1111
gcc \
1212
git \
13+
jq \
1314
libc-dev \
1415
libffi-dev \
15-
libgcc-6-dev \
16+
libgcc-10-dev \
1617
libssl-dev \
1718
make \
1819
openssl \
@@ -23,34 +24,34 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
2324
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
2425

2526
RUN \
26-
mkdir -p /compose && \
27-
if [ -z ${COMPOSE_VERSION+x} ]; then \
28-
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \
29-
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
30-
fi && \
31-
git clone https://github.com/docker/compose.git && \
32-
cd /compose && \
33-
git checkout "${COMPOSE_VERSION}" && \
34-
pip3 install -U pip && \
35-
pip install -U --ignore-installed \
36-
virtualenv \
37-
tox && \
38-
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
39-
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
40-
tox --notest && \
41-
mkdir -p dist && \
42-
chmod 777 dist && \
43-
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
44-
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
45-
export PATH="/compose/pyinstaller:${PATH}" && \
46-
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
47-
ls -la dist/ && \
48-
ldd dist/docker-compose && \
49-
mv dist/docker-compose /usr/local/bin && \
50-
docker-compose version
27+
mkdir -p /compose && \
28+
if [ -z ${COMPOSE_VERSION+x} ]; then \
29+
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases" \
30+
| jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name'); \
31+
fi && \
32+
git clone https://github.com/docker/compose.git && \
33+
cd /compose && \
34+
git checkout "${COMPOSE_VERSION}" && \
35+
pip3 install -U pip && \
36+
pip install -U --ignore-installed \
37+
virtualenv \
38+
tox && \
39+
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
40+
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
41+
tox --notest && \
42+
mkdir -p dist && \
43+
chmod 777 dist && \
44+
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
45+
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
46+
export PATH="/compose/pyinstaller:${PATH}" && \
47+
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
48+
ls -la dist/ && \
49+
ldd dist/docker-compose && \
50+
mv dist/docker-compose /usr/local/bin && \
51+
docker-compose version
5152

5253
############## runtime stage ##############
53-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic
54+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
5455

5556
ARG BUILD_DATE
5657
ARG VERSION

Dockerfile.armhf

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
ARG DOCKER_VERSION=19.03
1+
ARG DOCKER_VERSION=19.03.8
22

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

5-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-bionic AS build
5+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal AS build
66

77
ARG COMPOSE_VERSION
88

99
RUN apt-get update && apt-get install --no-install-recommends -y \
1010
curl \
1111
gcc \
1212
git \
13+
jq \
1314
libc-dev \
1415
libffi-dev \
15-
libgcc-6-dev \
16+
libgcc-10-dev \
1617
libssl-dev \
1718
make \
1819
openssl \
@@ -23,34 +24,34 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
2324
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
2425

2526
RUN \
26-
mkdir -p /compose && \
27-
if [ -z ${COMPOSE_VERSION+x} ]; then \
28-
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \
29-
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
30-
fi && \
31-
git clone https://github.com/docker/compose.git && \
32-
cd /compose && \
33-
git checkout "${COMPOSE_VERSION}" && \
34-
pip3 install -U pip && \
35-
pip install -U --ignore-installed \
36-
virtualenv \
37-
tox && \
38-
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
39-
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
40-
tox --notest && \
41-
mkdir -p dist && \
42-
chmod 777 dist && \
43-
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
44-
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
45-
export PATH="/compose/pyinstaller:${PATH}" && \
46-
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
47-
ls -la dist/ && \
48-
ldd dist/docker-compose && \
49-
mv dist/docker-compose /usr/local/bin && \
50-
docker-compose version
27+
mkdir -p /compose && \
28+
if [ -z ${COMPOSE_VERSION+x} ]; then \
29+
COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases" \
30+
| jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name'); \
31+
fi && \
32+
git clone https://github.com/docker/compose.git && \
33+
cd /compose && \
34+
git checkout "${COMPOSE_VERSION}" && \
35+
pip3 install -U pip && \
36+
pip install -U --ignore-installed \
37+
virtualenv \
38+
tox && \
39+
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
40+
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
41+
tox --notest && \
42+
mkdir -p dist && \
43+
chmod 777 dist && \
44+
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
45+
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
46+
export PATH="/compose/pyinstaller:${PATH}" && \
47+
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
48+
ls -la dist/ && \
49+
ldd dist/docker-compose && \
50+
mv dist/docker-compose /usr/local/bin && \
51+
docker-compose version
5152

5253
############## runtime stage ##############
53-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-bionic
54+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
5455

5556
ARG BUILD_DATE
5657
ARG VERSION

0 commit comments

Comments
 (0)