Skip to content

Commit 9fee111

Browse files
scripts/bupmer: add a Dockerfile
Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent d49cb7b commit 9fee111

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

scripts/bumper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bumper

scripts/bumper/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.14 as builder
2+
3+
WORKDIR /src
4+
COPY main.go go.mod ./
5+
RUN go build -o /bin/bumper -mod=mod ./...
6+
7+
FROM quay.io/centos/centos:stream8
8+
9+
RUN dnf install -y git glibc make
10+
COPY --from=builder /bin/bumper /usr/bin/bumper
11+
COPY --from=builder /usr/bin/go /usr/bin/go
12+
COPY --from=builder /usr/lib/golang /usr/lib/golang
13+
14+
ENTRYPOINT ["bumper"]

scripts/bumper/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (o *options) Validate() error {
105105
switch fetchMode(o.fetchMode) {
106106
case ssh, https:
107107
default:
108-
return fmt.Errorf("--mode must be one of %v", []fetchMode{https, ssh})
108+
return fmt.Errorf("--fetch-mode must be one of %v", []fetchMode{https, ssh})
109109
}
110110

111111
if _, err := logrus.ParseLevel(o.logLevel); err != nil {

0 commit comments

Comments
 (0)