From 6e7d1f3e4987e3351907230e48ee4c4a84ba5c18 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 3 Jan 2021 15:37:13 +0100 Subject: [PATCH] chore(docker): use standalone dockerfiles for multiarch --- docker/Dockerfile | 24 ------------------------ docker/Dockerfile.amd64 | 25 +++++++++++++++++++++++++ docker/Dockerfile.arm | 25 +++++++++++++++++++++++++ docker/Dockerfile.arm64 | 25 +++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 24 deletions(-) delete mode 100644 docker/Dockerfile create mode 100644 docker/Dockerfile.amd64 create mode 100644 docker/Dockerfile.arm create mode 100644 docker/Dockerfile.arm64 diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 3c30c5b..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM python:3.9-alpine - -LABEL maintainer="Robert Kaussow " \ - org.label-schema.name="docker-autotag" \ - org.label-schema.vcs-url="https://github.com/thegeeklab/docker-autotag" \ - org.label-schema.vendor="Robert Kaussow" \ - org.label-schema.schema-version="1.0" - -ENV PY_COLORS=1 - -ADD dist/docker_autotag-*.whl / - -RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \ - apk --update add git && \ - pip install --upgrade --no-cache-dir pip && \ - pip install --no-cache-dir docker_autotag-*.whl && \ - apk del .build-deps && \ - rm -f docker_autotag-*.whl && \ - rm -rf /var/cache/apk/* && \ - rm -rf /root/.cache/ - -USER root -CMD [] -ENTRYPOINT ["/usr/local/bin/docker-autotag"] diff --git a/docker/Dockerfile.amd64 b/docker/Dockerfile.amd64 new file mode 100644 index 0000000..20faeb4 --- /dev/null +++ b/docker/Dockerfile.amd64 @@ -0,0 +1,25 @@ +FROM python:3.9-alpine + +LABEL maintainer="Robert Kaussow " +LABEL org.opencontainers.image.authors="Robert Kaussow " +LABEL org.opencontainers.image.title="docker-autotag" +LABEL org.opencontainers.image.url="https://github.com/thegeeklab/docker-autotag" +LABEL org.opencontainers.image.source="https://github.com/thegeeklab/docker-autotag" +LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/docker-autotag" + +ENV PY_COLORS=1 + +ADD dist/docker_autotag-*.whl / + +RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \ + apk --update add git && \ + pip install --upgrade --no-cache-dir pip && \ + pip install --no-cache-dir $(find / -name "docker_autotag-*.whl") && \ + apk del .build-deps && \ + rm -f docker_autotag-*.whl && \ + rm -rf /var/cache/apk/* && \ + rm -rf /root/.cache/ + +USER root +CMD [] +ENTRYPOINT ["/usr/local/bin/docker-autotag"] diff --git a/docker/Dockerfile.arm b/docker/Dockerfile.arm new file mode 100644 index 0000000..20faeb4 --- /dev/null +++ b/docker/Dockerfile.arm @@ -0,0 +1,25 @@ +FROM python:3.9-alpine + +LABEL maintainer="Robert Kaussow " +LABEL org.opencontainers.image.authors="Robert Kaussow " +LABEL org.opencontainers.image.title="docker-autotag" +LABEL org.opencontainers.image.url="https://github.com/thegeeklab/docker-autotag" +LABEL org.opencontainers.image.source="https://github.com/thegeeklab/docker-autotag" +LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/docker-autotag" + +ENV PY_COLORS=1 + +ADD dist/docker_autotag-*.whl / + +RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \ + apk --update add git && \ + pip install --upgrade --no-cache-dir pip && \ + pip install --no-cache-dir $(find / -name "docker_autotag-*.whl") && \ + apk del .build-deps && \ + rm -f docker_autotag-*.whl && \ + rm -rf /var/cache/apk/* && \ + rm -rf /root/.cache/ + +USER root +CMD [] +ENTRYPOINT ["/usr/local/bin/docker-autotag"] diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64 new file mode 100644 index 0000000..20faeb4 --- /dev/null +++ b/docker/Dockerfile.arm64 @@ -0,0 +1,25 @@ +FROM python:3.9-alpine + +LABEL maintainer="Robert Kaussow " +LABEL org.opencontainers.image.authors="Robert Kaussow " +LABEL org.opencontainers.image.title="docker-autotag" +LABEL org.opencontainers.image.url="https://github.com/thegeeklab/docker-autotag" +LABEL org.opencontainers.image.source="https://github.com/thegeeklab/docker-autotag" +LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/docker-autotag" + +ENV PY_COLORS=1 + +ADD dist/docker_autotag-*.whl / + +RUN apk --update add --virtual .build-deps build-base libffi-dev libressl-dev && \ + apk --update add git && \ + pip install --upgrade --no-cache-dir pip && \ + pip install --no-cache-dir $(find / -name "docker_autotag-*.whl") && \ + apk del .build-deps && \ + rm -f docker_autotag-*.whl && \ + rm -rf /var/cache/apk/* && \ + rm -rf /root/.cache/ + +USER root +CMD [] +ENTRYPOINT ["/usr/local/bin/docker-autotag"]