From: "John Helmert III" <ajak@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/docker-images:master commit in: /, .github/workflows/
Date: Thu, 29 Jun 2023 15:22:45 +0000 (UTC) [thread overview]
Message-ID: <1688052155.c98033b1dc679a5e3ded53ee52ad15e738eeb0a0.ajak@gentoo> (raw)
commit: c98033b1dc679a5e3ded53ee52ad15e738eeb0a0
Author: John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 29 02:22:56 2023 +0000
Commit: John Helmert III <ajak <AT> gentoo <DOT> 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 <ajak <AT> 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"]
next reply other threads:[~2023-06-29 15:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 15:22 John Helmert III [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-09-21 22:12 [gentoo-commits] proj/docker-images:master commit in: /, .github/workflows/ John Helmert III
2024-02-08 3:17 John Helmert III
2022-04-12 8:04 Alexys Jacob
2021-12-01 11:31 Alexys Jacob
2021-08-20 18:05 Alexys Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1688052155.c98033b1dc679a5e3ded53ee52ad15e738eeb0a0.ajak@gentoo \
--to=ajak@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox