Skip to content

Commit e57737d

Browse files
authored
ubi8-git and ubi8-google-api-python-client - init add (#308)
1 parent 47f646a commit e57737d

File tree

6 files changed

+148
-0
lines changed

6 files changed

+148
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
apiVersion: v1
3+
kind: Template
4+
labels:
5+
template: ubi8-git
6+
metadata:
7+
annotations:
8+
description: Git utility image
9+
tags: git, ubi8
10+
name: ubi8-git
11+
objects:
12+
- apiVersion: "v1"
13+
kind: "BuildConfig"
14+
metadata:
15+
name: "ubi8-git"
16+
spec:
17+
output:
18+
to:
19+
kind: "ImageStreamTag"
20+
name: "ubi8-git:latest"
21+
source:
22+
contextDir: "${CONTEXT_DIR}"
23+
git:
24+
uri: "${SOURCE_REPOSITORY_URL}"
25+
ref: "${SOURCE_REPOSITORY_REF}"
26+
strategy:
27+
dockerStrategy:
28+
dockerfilePath: Dockerfile
29+
resources:
30+
requests:
31+
cpu: 1
32+
memory: "512Mi"
33+
limits:
34+
cpu: 2
35+
memory: "1Gi"
36+
- apiVersion: v1
37+
kind: ImageStream
38+
metadata:
39+
name: ubi8-git
40+
spec:
41+
lookupPolicy:
42+
local: true
43+
parameters:
44+
- description: Path within Git repository to build; empty for root of repository
45+
name: CONTEXT_DIR
46+
value: ubi8-git
47+
- description: Git branch/tag reference
48+
name: SOURCE_REPOSITORY_REF
49+
value: master
50+
- description: Git source URL for application
51+
name: SOURCE_REPOSITORY_URL
52+
required: true
53+
value: https://github.com/redhat-cop/containers-quickstarts

ubi8-git/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubi8
2+
3+
LABEL maintainer="Red Hat Services"
4+
5+
# Update image
6+
RUN dnf update -y && rm -rf /var/cache/yum
7+
8+
# Install packages
9+
RUN dnf install -y \
10+
git \
11+
&& dnf clean all

ubi8-git/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ubi8-git
2+
3+
A utility image that is the UBI8 image + git. Useful for use in things like GitLab CI pipelines where you want to use a UBI based image and need access to git.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
apiVersion: v1
3+
kind: Template
4+
labels:
5+
template: ubi8-google-api-python-client
6+
metadata:
7+
annotations:
8+
description: google-api-python-client utility image
9+
tags: git, ubi8
10+
name: ubi8-google-api-python-client
11+
objects:
12+
- apiVersion: "v1"
13+
kind: "BuildConfig"
14+
metadata:
15+
name: "ubi8-google-api-python-client"
16+
spec:
17+
output:
18+
to:
19+
kind: "ImageStreamTag"
20+
name: "ubi8-google-api-python-client:latest"
21+
source:
22+
contextDir: "${CONTEXT_DIR}"
23+
git:
24+
uri: "${SOURCE_REPOSITORY_URL}"
25+
ref: "${SOURCE_REPOSITORY_REF}"
26+
strategy:
27+
dockerStrategy:
28+
dockerfilePath: Dockerfile
29+
resources:
30+
requests:
31+
cpu: 1
32+
memory: "512Mi"
33+
limits:
34+
cpu: 2
35+
memory: "1Gi"
36+
- apiVersion: v1
37+
kind: ImageStream
38+
metadata:
39+
name: ubi8-google-api-python-client
40+
spec:
41+
lookupPolicy:
42+
local: true
43+
parameters:
44+
- description: Path within Git repository to build; empty for root of repository
45+
name: CONTEXT_DIR
46+
value: ubi8-google-api-python-client
47+
- description: Git branch/tag reference
48+
name: SOURCE_REPOSITORY_REF
49+
value: master
50+
- description: Git source URL for application
51+
name: SOURCE_REPOSITORY_URL
52+
required: true
53+
value: https://github.com/redhat-cop/containers-quickstarts
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM ubi8
2+
3+
LABEL maintainer="Red Hat Services"
4+
5+
# Update image
6+
RUN dnf update -y && rm -rf /var/cache/yum
7+
8+
# Install packages
9+
RUN dnf install -y \
10+
git \
11+
python36 \
12+
python3-pip \
13+
python3-numpy \
14+
python3-scipy \
15+
python3-setuptools \
16+
python3-six \
17+
&& dnf clean all
18+
19+
# Install Python modules
20+
RUN pip3 install --upgrade \
21+
pip \
22+
google-api-python-client \
23+
google-auth-httplib2 \
24+
google-auth-oauthlib \
25+
oauth2client
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ubi8-google-api-python-client
2+
3+
A utility image that is the UBI8 image the [google-api-python-client](https://github.com/googleapis/google-api-python-client) and dependent libraries. Useful for use in things like GitLab CI pipelines where you want to use a UBI based image and need access to the Google API.

0 commit comments

Comments
 (0)