This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile.aarch64
64 lines (55 loc) · 2.14 KB
/
Dockerfile.aarch64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
ARG DOCKER_VERSION=20.10.13
FROM arm64v8/docker:${DOCKER_VERSION} AS docker-cli
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal AS build
ARG COMPOSE_VERSION
RUN apt-get update && apt-get install --no-install-recommends -y \
curl \
gcc \
git \
jq \
libc-dev \
libffi-dev \
libgcc-10-dev \
libssl-dev \
make \
openssl \
python3-dev \
python3-pip \
zlib1g-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" \
| jq -r 'first(.[] | select(.tag_name | startswith("1."))) | .tag_name'); \
fi && \
git clone https://github.com/docker/compose.git && \
cd /compose && \
git checkout "${COMPOSE_VERSION}" && \
pip3 install -U pip && \
pip install -U --ignore-installed \
virtualenv \
tox && \
PY_ARG=$(printf "$(python3 -V)" | awk '{print $2}' | awk 'BEGIN{FS=OFS="."} NF--' | sed 's|\.||g' | sed 's|^|py|g') && \
sed -i "s|envlist = .*|envlist = ${PY_ARG},pre-commit|g" tox.ini && \
tox --notest && \
mkdir -p dist && \
chmod 777 dist && \
/compose/.tox/${PY_ARG}/bin/pip3 install -q -r requirements-build.txt && \
echo "$(script/build/write-git-sha)" > compose/GITSHA && \
export PATH="/compose/pyinstaller:${PATH}" && \
/compose/.tox/${PY_ARG}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec && \
ls -la dist/ && \
ldd dist/docker-compose && \
mv dist/docker-compose /usr/local/bin && \
docker-compose version
############## runtime stage ##############
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
COPY --from=build /compose/docker-compose-entrypoint.sh /usr/local/bin/docker-compose-entrypoint.sh
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
COPY --from=build /usr/local/bin/docker-compose /usr/local/bin/docker-compose
ENTRYPOINT ["sh", "/usr/local/bin/docker-compose-entrypoint.sh"]