Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Change our base image from CentOS to UBI #247

Merged
merged 5 commits into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# yupana-centos7
FROM centos/python-36-centos7
# yupana-ubi7
FROM registry.access.redhat.com/ubi7/python-36:latest

EXPOSE 8080

Expand Down Expand Up @@ -36,12 +36,14 @@ USER root
RUN INSTALL_PKGS="${NODEJS_SCL} \
${NODEJS_SCL}-npm \
${NODEJS_SCL}-nodejs-nodemon \
rh-python36 rh-python36-python-devel rh-python36-python-setuptools rh-python36-python-pip nss_wrapper \
httpd24 httpd24-httpd-devel httpd24-mod_ssl httpd24-mod_auth_kerb httpd24-mod_ldap \
httpd24-mod_session atlas-devel gcc-gfortran libffi-devel libtool-ltdl enchant \
" && \
yum-config-manager --enable centos-sclo-rh-testing && \
yum -y --setopt=tsflags=nodocs install --enablerepo=centosplus $INSTALL_PKGS && \
yum install -y yum-utils && \
prepare-yum-repositories rhel-server-rhscl-7-rpms && \
yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum remove -y rh-nodejs6\* && \
ln -s /usr/lib/node_modules/nodemon/bin/nodemon.js /usr/bin/nodemon && \
yum -y clean all --enablerepo='*'

# sets io.openshift.s2i.scripts-url label that way, or update that label
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ oc-create-configmap:
$(OC_PARAMS) $(MAKE) __oc-apply-object
$(OC_PARAMS) $(MAKE) __oc-create-object

oc-create-imagestream: OC_OBJECT := 'is/centos is/python-36-centos7 is/postgresql'
oc-create-imagestream: OC_OBJECT := 'is/centos is/python-36-ubi7 is/postgresql'
oc-create-imagestream: OC_PARAMETER_FILE = imagestream.env
oc-create-imagestream: OC_TEMPLATE_FILE = imagestream.yaml
oc-create-imagestream: OC_PARAMS = OC_OBJECT=$(OC_OBJECT) OC_PARAMETER_FILE=$(OC_PARAMETER_FILE) OC_TEMPLATE_FILE=$(OC_TEMPLATE_FILE) NAMESPACE=$(NAMESPACE)
Expand Down
97 changes: 49 additions & 48 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jenkins/deploy-yupana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ oc project ${OPENSHIFT_PROJECT}


# Is this a new object deployment or an existing? Decide based on whether the object exists
IMAGESTREAM=`oc get -o name 'is/python-36-centos7' 2>/dev/null | tail -1 | awk '{print $1}'`
IMAGESTREAM=`oc get -o name 'is/python-36-ubi7' 2>/dev/null | tail -1 | awk '{print $1}'`
CONFIGMAP=`oc get configmap -l app=${APP_NAME} 2>/dev/null | tail -1 | awk '{print $1}'`
SECRET=`oc get secret -l app=${APP_NAME} 2>/dev/null | tail -1 | awk '{print $1}'`
DB_CONFIG=`oc get dc ${APP_NAME}-db 2>/dev/null | tail -1 | awk '{print $1}'`
Expand Down
4 changes: 2 additions & 2 deletions openshift/imagestream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ objects:
- apiVersion: v1
kind: ImageStream
metadata:
name: python-36-centos7
name: python-36-ubi7
namespace: ${NAMESPACE}
spec:
lookupPolicy:
Expand All @@ -30,7 +30,7 @@ objects:
- annotations: null
from:
kind: DockerImage
name: centos/python-36-centos7
name: registry.access.redhat.com/ubi7/python-36
name: latest
referencePolicy:
type: Source
Expand Down
2 changes: 1 addition & 1 deletion openshift/yupana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ objects:
key: build-version
from:
kind: ImageStreamTag
name: python-36-centos7:latest
name: python-36-ubi7:latest
namespace: ${NAMESPACE}
type: Source
triggers:
Expand Down