|
1 | 1 | ARG DOCKER_VERSION=19.03.8 |
2 | 2 |
|
3 | | -FROM arm64v8/docker:${DOCKER_VERSION} AS docker-cli |
| 3 | +FROM docker:${DOCKER_VERSION} AS docker-cli |
4 | 4 |
|
5 | | -FROM lsiobase/ubuntu:arm64v8-bionic AS build |
| 5 | +FROM lsiobase/alpine:arm64v8-3.12 AS build |
6 | 6 |
|
7 | 7 | ARG COMPOSE_VERSION |
8 | 8 |
|
9 | | -RUN apt-get update && apt-get install --no-install-recommends -y \ |
| 9 | +RUN \ |
| 10 | + apk add --no-cache \ |
| 11 | + bash \ |
| 12 | + build-base \ |
| 13 | + ca-certificates \ |
10 | 14 | curl \ |
11 | 15 | gcc \ |
12 | 16 | git \ |
13 | 17 | libc-dev \ |
14 | 18 | libffi-dev \ |
15 | | - libgcc-6-dev \ |
16 | | - libssl-dev \ |
| 19 | + libgcc \ |
17 | 20 | make \ |
| 21 | + musl-dev \ |
18 | 22 | openssl \ |
| 23 | + openssl-dev \ |
19 | 24 | python3-dev \ |
20 | | - python3-pip \ |
21 | | - zlib1g-dev |
| 25 | + py3-pip \ |
| 26 | + zlib-dev |
22 | 27 |
|
23 | 28 | COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker |
24 | 29 |
|
25 | 30 | RUN \ |
26 | 31 | mkdir -p /compose && \ |
27 | 32 | if [ -z ${COMPOSE_VERSION+x} ]; then \ |
28 | 33 | COMPOSE_VERSION=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \ |
29 | | - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ |
| 34 | + | awk '/tag_name/{print $4;exit}' FS='[""]' | awk '$0="alpine-"$0'); \ |
30 | 35 | fi && \ |
| 36 | + COMPOSE_VERSION=$(echo "$COMPOSE_VERSION" | sed 's|alpine-||') && \ |
31 | 37 | git clone https://github.com/docker/compose.git && \ |
32 | 38 | cd /compose && \ |
33 | 39 | git checkout "${COMPOSE_VERSION}" && \ |
|
40 | 46 | chmod 777 dist && \ |
41 | 47 | /compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \ |
42 | 48 | echo "$(script/build/write-git-sha)" > compose/GITSHA && \ |
| 49 | + PYINSTVER=$(cat requirements-build.txt | grep pyinstaller | sed 's|pyinstaller==|v|') && \ |
| 50 | + git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller && \ |
| 51 | + cd /tmp/pyinstaller/bootloader && \ |
| 52 | + git checkout $(PYINSTVER) && \ |
| 53 | + /compose/.tox/${PY_ARG}/bin/python3 ./waf configure --no-lsb all && \ |
| 54 | + /compose/.tox/${PY_ARG}/bin/pip3 install .. && \ |
| 55 | + cd /compose && \ |
43 | 56 | export PATH="/compose/pyinstaller:${PATH}" && \ |
44 | 57 | /compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \ |
45 | 58 | ls -la dist/ && \ |
|
48 | 61 | docker-compose version |
49 | 62 |
|
50 | 63 | ############## runtime stage ############## |
51 | | -FROM lsiobase/ubuntu:arm64v8-bionic |
| 64 | +FROM lsiobase/alpine:arm64v8-3.12 |
52 | 65 |
|
53 | 66 | ARG BUILD_DATE |
54 | 67 | ARG VERSION |
|
0 commit comments