Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VZ-11478: Update build of rancher to use OL8 #141

Merged
merged 7 commits into from
Nov 17, 2023
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
37 changes: 16 additions & 21 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
FROM ghcr.io/oracle/oraclelinux:7-slim
FROM ghcr.io/oracle/oraclelinux:8-slim

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a suggestion - you can just use OL8 here since this image is not the final image . If you use OL8 you can re-use the yum commands (not repositories). But OL8-slim works fine as well.

RUN yum-config-manager --enable ol7_optional_latest && \
yum-config-manager --enable ol7_addons && \
yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/x86_64 && \
yum-config-manager --add-repo https://yum.oracle.com/repo/OracleLinux/OL7/olcne16/x86_64/ && \
yum-config-manager --add-repo https://yum.oracle.com/repo/OracleLinux/OL7/developer_EPEL/x86_64 && \
yum-config-manager --enable ol7_developer_golang119 && \
yum install oracle-golang-release-el7 -y && \
yum clean all

RUN yum update -y && \
yum install -y bash rh-git227 gcc glibc-static vim less libffi file curl wget ca-certificates unzip tar jq nc mkisofs \
openssl-devel libffi-devel python3 iproute vim less bash-completion sysstat acl hostname openssl \
helm-3.11.1-1.el7.x86_64 kubectl-1.25.11-1.el7.x86_64 docker-engine-19.03.11.ol-13.el7.x86_64 etcd-3.5.6-3.el7.x86_64 tini-0.19.0-2.el7.x86_64 \
golang-1.19 && \
# Set up needed to ensure git 2.27 from rh-git227 is on the path
ln /opt/rh/rh-git227/enable /etc/profile.d/git.sh && \
source /etc/profile.d/git.sh && \
git version && \
RUN microdnf update -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs && \
microdnf install -y golang-1.19.13-1.module+el8.8.0+21189+9e6e1f9f.x86_64 && \
microdnf install -y git gcc vim file wget unzip jq nc mkisofs && \
microdnf install -y glibc-static --enablerepo=ol8_codeready_builder && \
microdnf install -y openssl-devel libffi-devel python3 iproute bash-completion sysstat hostname && \
microdnf install -y dnf && \
microdnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --add-repo http://yum.oracle.com/repo/OracleLinux/OL8/olcne17/x86_64 && \
microdnf install -y helm-3.12.0-1.el8.x86_64 && \
microdnf install -y kubectl-1.26.6-1.el8.x86_64 && \
microdnf install -y etcd-3.5.6-4.el8.x86_64 && \
dnf config-manager --add-repo http://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/x86_64 && \
microdnf install -y tini-0.19.0-1.el8.x86_64 && \
mv /usr/bin/helm /usr/bin/helm_v3 && \
go version && \
yum clean all && \
rm -rf /var/cache/yum
microdnf clean all && \
rm -rf /var/cache/yum /var/lib/rpm/*
29 changes: 20 additions & 9 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
ARG RANCHER_BASE_TAG=base
ARG RANCHER_REPO=rancher
# Use the build of Dockerfile.base as the FROM image
FROM ${RANCHER_REPO}/rancher:${RANCHER_BASE_TAG}

FROM ghcr.io/oracle/oraclelinux:7-slim

RUN yum-config-manager --enable ol7_optional_latest && \
yum-config-manager --enable ol7_addons && \
yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/x86_64 && \
yum-config-manager --add-repo https://yum.oracle.com/repo/OracleLinux/OL7/olcne16/x86_64/ && \
yum-config-manager --add-repo https://yum.oracle.com/repo/OracleLinux/OL7/developer_EPEL/x86_64 && \
yum-config-manager --enable ol7_developer_golang119 && \
yum install oracle-golang-release-el7 -y && \
yum update -y && \
yum install -y git bash gcc glibc-static vim less libffi file curl wget ca-certificates unzip tar jq nc mkisofs \
openssl-devel libffi-devel python3 iproute vim less bash-completion sysstat acl hostname openssl \
helm-3.11.1-1.el7.x86_64 docker-engine-19.03.11.ol-13.el7.x86_64 etcd-3.5.6-3.el7.x86_64 tini-0.19.0-2.el7.x86_64 \
golang-1.19 && \
mv /usr/bin/helm /usr/bin/helm_v3 && \
go version && \
yum clean all && \
rm -rf /var/cache/yum

ARG DAPPER_HOST_ARCH
ARG CATTLE_DASHBOARD_TAR_URL
Expand Down Expand Up @@ -31,13 +48,10 @@ ENV KUSTOMIZE_VERSION v5.0.1

ENV GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash


# kontainer-driver-metadata branch to be set for specific branch other than dev/master, logic at rancher/rancher/pkg/settings/setting.go
ENV CATTLE_KDM_BRANCH=release-v2.7

# Update PATH to make sure git 2.27 is on the path
ENV PATH="/opt/rh/rh-git227/root/usr/bin:${PATH}" \
KUSTOMIZE_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_${ARCH}.tar.gz \
ENV KUSTOMIZE_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_${ARCH}.tar.gz \
YQ_URL=https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_${ARCH}

RUN curl -sLf ${KUSTOMIZE_URL} | tar -xzf - -C /usr/bin && \
Expand All @@ -57,8 +71,5 @@ VOLUME /var/lib/rancher
VOLUME /var/lib/kubelet
WORKDIR ${DAPPER_SOURCE}

# Set up the git 2.x environment variables so that it's on the path and the needed files on the LD_LIBRARY_PATH
RUN cat /etc/profile.d/git.sh >> /etc/profile

ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ replace (
go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v0.20.0
go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v0.20.0
go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.7.0
golang.org/x/net => golang.org/x/net v0.17.0

helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.9.0-rancher1
k8s.io/api => k8s.io/api v0.25.12
Expand Down Expand Up @@ -131,12 +132,12 @@ require (
github.com/urfave/cli v1.22.12
github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5
github.com/vmware/govmomi v0.30.4
golang.org/x/crypto v0.11.0
golang.org/x/crypto v0.14.0
golang.org/x/mod v0.10.0
golang.org/x/net v0.12.0
golang.org/x/oauth2 v0.10.0
golang.org/x/sync v0.3.0
golang.org/x/text v0.11.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.9.3 // indirect
google.golang.org/api v0.130.0
google.golang.org/grpc v1.56.1
Expand Down Expand Up @@ -378,8 +379,8 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
Loading
Loading