Skip to content

Commit 22a28cc

Browse files
author
Osher De Paz
authoredMar 20, 2022
NO-ISSUE: optimize build image size (#3500)
assisted-service-build image size gotten to 7GB, which impacts developers environment (and running time). This change aims to get rid of several redundant things: 1. Ignoring big files that sometimes local podman deployment creates 2. Removing installation of 7zip and EPEL
1 parent e251185 commit 22a28cc

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed
 

‎.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
build
2+
3+
# Files used for onprem testing
4+
coreos-installer
5+
livecd.iso

‎Dockerfile.assisted-service-build

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ USER 0
1111

1212
RUN mkdir build && chmod g+xw -R build/
1313

14-
RUN yum install -y epel-release \
15-
&& yum install -y --setopt=skip_missing_names_on_install=False \
16-
gcc genisoimage jq git libvirt-client libvirt-devel java
14+
RUN yum install -y --setopt=skip_missing_names_on_install=False \
15+
gcc genisoimage git libvirt-client libvirt-devel java
1716

1817
COPY --from=registry.ci.openshift.org/openshift/release:golang-1.17 /usr/bin/gotestsum /usr/bin/make /usr/bin/
1918
COPY --from=registry.ci.openshift.org/openshift/release:golang-1.17 /usr/local/go /usr/local/go

‎hack/setup_env.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ function spectral() {
3939
chmod +x /usr/local/bin/spectral
4040
}
4141

42+
function jq() {
43+
echo "Installing jq..."
44+
curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 --output /usr/local/bin/jq
45+
chmod +x /usr/local/bin/jq
46+
}
47+
4248
function butane() {
4349
echo "Installing butane..."
4450
curl https://mirror.openshift.com/pub/openshift-v4/clients/butane/latest/butane-${ARCH} --output /usr/local/bin/butane
@@ -53,10 +59,10 @@ function assisted_service() {
5359
install -o root -g root -m 0755 /tmp/kubectl /usr/local/bin/kubectl && \
5460
rm -f /tmp/kubectl
5561

56-
yum clean all && yum makecache
57-
yum --disablerepo=epel -y update ca-certificates
5862
yum install -y --setopt=skip_missing_names_on_install=False \
59-
docker podman awscli python3-pip genisoimage skopeo p7zip
63+
docker podman awscli python3-pip genisoimage skopeo
64+
65+
jq
6066

6167
butane
6268

0 commit comments

Comments
 (0)
Please sign in to comment.