From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 36C38158009 for ; Thu, 29 Jun 2023 15:22:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 76029E07A7; Thu, 29 Jun 2023 15:22:48 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 57EFEE07A7 for ; Thu, 29 Jun 2023 15:22:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5A63233BF29 for ; Thu, 29 Jun 2023 15:22:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E748E135 for ; Thu, 29 Jun 2023 15:22:45 +0000 (UTC) From: "John Helmert III" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "John Helmert III" Message-ID: <1688052155.c98033b1dc679a5e3ded53ee52ad15e738eeb0a0.ajak@gentoo> Subject: [gentoo-commits] proj/docker-images:master commit in: /, .github/workflows/ X-VCS-Repository: proj/docker-images X-VCS-Files: .github/workflows/build.yml build-python.sh python.Dockerfile X-VCS-Directories: / .github/workflows/ X-VCS-Committer: ajak X-VCS-Committer-Name: John Helmert III X-VCS-Revision: c98033b1dc679a5e3ded53ee52ad15e738eeb0a0 X-VCS-Branch: master Date: Thu, 29 Jun 2023 15:22:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bdf83bd1-06a3-4b75-a35e-a51f6166cf86 X-Archives-Hash: cc803160388c5cf1408ac662a24cf274 commit: c98033b1dc679a5e3ded53ee52ad15e738eeb0a0 Author: John Helmert III gentoo org> AuthorDate: Thu Jun 29 02:22:56 2023 +0000 Commit: John Helmert III gentoo org> CommitDate: Thu Jun 29 15:22:35 2023 +0000 URL: https://gitweb.gentoo.org/proj/docker-images.git/commit/?id=c98033b1 add plumbing to produce a python testing image Closes: #73 Signed-off-by: John Helmert III gentoo.org> Closes: https://github.com/gentoo/gentoo-docker-images/pull/128 .github/workflows/build.yml | 5 +++++ build-python.sh | 17 +++++++++++++++++ python.Dockerfile | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 021efcc..ef4e56f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,7 @@ jobs: fail-fast: false matrix: target: + - python - portage - stage3-amd64-hardened-nomultilib-openrc - stage3-amd64-hardened-openrc @@ -67,7 +68,11 @@ jobs: - name: Set up buildx uses: docker/setup-buildx-action@v2 - name: Build image + if: startswith(matrix.target, 'stage3') || startswith(matrix.target, 'portage') run: ./build.sh + - name: Build python image + if: startswith( matrix.target, 'python') + run: ./build-python.sh - name: Inspect image run: docker image inspect "${ORG}/${TARGET/-/:}" - name: Inspect portage diff --git a/build-python.sh b/build-python.sh new file mode 100755 index 0000000..6289c05 --- /dev/null +++ b/build-python.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +NAME=python +VERSION=${VERSION:-$(date -u +%Y%m%d)} +VERSION_SUFFIX="-${VERSION}" + +ORG=${ORG:-gentoo} + +docker buildx build \ + --file "${NAME}.Dockerfile" \ + --build-arg ARCH="amd64" \ + --build-arg MICROARCH="amd64" \ + --tag "${ORG}/python" \ + --platform "linux/amd64" \ + --progress plain \ + --load \ + . diff --git a/python.Dockerfile b/python.Dockerfile new file mode 100644 index 0000000..7b61532 --- /dev/null +++ b/python.Dockerfile @@ -0,0 +1,16 @@ +FROM gentoo/stage3:amd64-nomultilib-openrc + +# derived from https://github.com/projg2/gentoo-python-image/blob/master/Dockerfile + +RUN echo '*/* ~amd64' >> /etc/portage/package.accept_keywords/base.conf \ + && echo '*/* full-stdlib sqlite' >> /etc/portage/package.use/python \ + && echo 'dev-vcs/git -perl' >> /etc/portage/package.use/git \ + && wget --progress=dot:mega -O - https://github.com/gentoo-mirror/gentoo/archive/master.tar.gz | tar -xz \ + && mv gentoo-master /var/db/repos/gentoo \ + && emerge -1vnt --jobs dev-python/tox app-arch/lzip dev-vcs/git \ + dev-python/pypy{,3_9,3_10}-exe-bin dev-db/sqlite \ + && emerge -1v --jobs --nodeps dev-lang/python:{2.7,3.8,3.9,3.10,3.11,3.12} \ + dev-python/pypy{,3_9,3_10,3} \ + && rm -r /var/db/repos/* /var/cache/distfiles/* + +CMD ["/bin/bash"]