Poddlers: build from an image that has devel dependencies
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
ad7b61b213
commit
322067e1b2
3 changed files with 62 additions and 2 deletions
|
@ -8,3 +8,17 @@ spec:
|
|||
local: false
|
||||
status:
|
||||
dockerImageRepository: ""
|
||||
|
||||
|
||||
kind: List
|
||||
items:
|
||||
# The main image
|
||||
- apiVersion: image.openshift.io/v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: toddlers
|
||||
# The Python 3.11 builder image plus dependencies
|
||||
- apiVersion: image.openshift.io/v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: python-311-with-deps
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
FROM registry.access.redhat.com/ubi9/python-311:latest
|
||||
LABEL \
|
||||
name="python-311-with-deps" \
|
||||
vendor="Fedora Infrastructure" \
|
||||
license="MIT"
|
||||
USER root
|
||||
# Add RPM-only modules
|
||||
RUN dnf install -y \
|
||||
cairo-devel \
|
||||
cairo-gobject-devel \
|
||||
gobject-introspection-devel \
|
||||
libmodulemd \
|
||||
&& dnf clean all
|
||||
|
||||
USER 1001
|
|
@ -1,4 +1,35 @@
|
|||
---
|
||||
# Build a derivative of the python-311 builder image with dependencies added
|
||||
apiVersion: build.openshift.io/v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
name: python-311-with-deps
|
||||
labels:
|
||||
app: poddlers
|
||||
build: python-311-with-deps
|
||||
spec:
|
||||
runPolicy: Serial
|
||||
source:
|
||||
type: Dockerfile
|
||||
dockerfile: |-
|
||||
{{ load_file('Dockerfile-builder-image') | indent(6) }}
|
||||
strategy:
|
||||
type: Docker
|
||||
dockerStrategy:
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: python:3.11-ubi9
|
||||
namespace: openshift
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
name: python-311-with-deps:latest
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
- type: ImageChange
|
||||
|
||||
---
|
||||
# Build Toddlers
|
||||
apiVersion: build.openshift.io/v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
|
@ -22,8 +53,8 @@ spec:
|
|||
sourceStrategy:
|
||||
from:
|
||||
kind: ImageStreamTag
|
||||
name: python:3.11-ubi9
|
||||
namespace: openshift
|
||||
# Our own ImageStream with deps added to it
|
||||
name: python-3.11-with-deps:latest
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue