File tree 3 files changed +22
-5
lines changed
3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ RUN CGO_ENABLED=0 go build
46
46
# ###########################
47
47
# STEP 2 build a small image
48
48
# ###########################
49
- FROM localhost/ csipowermax-ubimicro:latest
49
+ FROM csipowermax-ubimicro:latest
50
50
LABEL vendor="Dell Inc." \
51
51
name="csipowermax-reverseproxy" \
52
52
summary="CSI PowerMax Reverse Proxy" \
Original file line number Diff line number Diff line change 10
10
# See the License for the specific language governing permissions and
11
11
# limitations under the License.
12
12
#
13
- REGISTRY ? ="localhost:5000/csipowermax-reverseproxy"
13
+ REG ? ="localhost:5000/csipowermax-reverseproxy"
14
14
VERSION ="latest"
15
15
16
16
coverpackages = revproxy/v2,revproxy/v2/pkg/config,revproxy/v2/pkg/standaloneproxy
@@ -30,12 +30,22 @@ check:
30
30
build : check
31
31
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build
32
32
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" .
35
42
36
43
docker-push : docker-build
37
- docker push " $( REGISTRY ) :$( VERSION) "
44
+ docker push " $( REG ) :$( VERSION) "
38
45
39
46
unit-test :
40
47
go test -v -coverprofile c.out -coverpkg $(coverpackages ) ./...
41
48
49
+ download-csm-common :
50
+ curl -O -L https://raw.githubusercontent.com/dell/csm/main/config/csm-common.mk
51
+
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments