Skip to content

Commit c89594e

Browse files
authored
Merge branch 'main' into add-interface-filters
2 parents 12e9055 + ea789b9 commit c89594e

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

csireverseproxy/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN CGO_ENABLED=0 go build
4646
############################
4747
# STEP 2 build a small image
4848
############################
49-
FROM localhost/csipowermax-ubimicro:latest
49+
FROM csipowermax-ubimicro:latest
5050
LABEL vendor="Dell Inc." \
5151
name="csipowermax-reverseproxy" \
5252
summary="CSI PowerMax Reverse Proxy" \

csireverseproxy/Makefile

+14-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212
#
13-
REGISTRY?="localhost:5000/csipowermax-reverseproxy"
13+
REG?="localhost:5000/csipowermax-reverseproxy"
1414
VERSION="latest"
1515

1616
coverpackages= revproxy/v2,revproxy/v2/pkg/config,revproxy/v2/pkg/standaloneproxy
@@ -30,12 +30,22 @@ check:
3030
build: check
3131
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build
3232

33-
docker-build: build
34-
docker build -t "$(REGISTRY):$(VERSION)" .
33+
build-base-image: download-csm-common
34+
$(eval include csm-common.mk)
35+
@echo "Building base image from $(DEFAULT_BASEIMAGE) and loading dependencies..."
36+
./buildubimicro.sh $(DEFAULT_BASEIMAGE)
37+
@echo "Base image build: SUCCESS"
38+
$(eval BASEIMAGE=csipowermax-ubimicro:latest)
39+
40+
docker-build: build build-base-image
41+
docker build -t "$(REG):$(VERSION)" --build-arg GOIMAGE="golang:1.22" .
3542

3643
docker-push: docker-build
37-
docker push "$(REGISTRY):$(VERSION)"
44+
docker push "$(REG):$(VERSION)"
3845

3946
unit-test:
4047
go test -v -coverprofile c.out -coverpkg $(coverpackages) ./...
4148

49+
download-csm-common:
50+
curl -O -L https://raw.githubusercontent.com/dell/csm/main/config/csm-common.mk
51+

csireverseproxy/buildubimicro.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
microcontainer=$(buildah from $1)
3+
micromount=$(buildah mount $microcontainer)
4+
dnf install --installroot $micromount --releasever=8 --nodocs --setopt install_weak_deps=false --setopt=reposdir=/etc/yum.repos.d/ rpm -y
5+
dnf clean all --installroot $micromount
6+
buildah umount $microcontainer
7+
buildah commit $microcontainer csipowermax-ubimicro

0 commit comments

Comments
 (0)