Skip to content

Commit

Permalink
🌱 Add dockerfile for rhtap (open-cluster-management-io#10)
Browse files Browse the repository at this point in the history
Signed-off-by: zhujian <jiazhu@redhat.com>
  • Loading branch information
zhujian7 authored Oct 18, 2023
1 parent 924343b commit c12a94b
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .tekton/addon-manager-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.addon
value: ./build/Dockerfile.addon.rhtap
- name: git-url
value: '{{repo_url}}'
- name: image-expires-after
Expand Down
2 changes: 1 addition & 1 deletion .tekton/addon-manager-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.addon
value: ./build/Dockerfile.addon.rhtap
- name: git-url
value: '{{repo_url}}'
- name: output-image
Expand Down
2 changes: 1 addition & 1 deletion .tekton/placement-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.placement
value: ./build/Dockerfile.placement.rhtap
- name: git-url
value: '{{repo_url}}'
- name: image-expires-after
Expand Down
2 changes: 1 addition & 1 deletion .tekton/placement-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.placement
value: ./build/Dockerfile.placement.rhtap
- name: git-url
value: '{{repo_url}}'
- name: output-image
Expand Down
2 changes: 1 addition & 1 deletion .tekton/registration-operator-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.registration-operator
value: ./build/Dockerfile.registration-operator.rhtap
- name: git-url
value: '{{repo_url}}'
- name: image-expires-after
Expand Down
2 changes: 1 addition & 1 deletion .tekton/registration-operator-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.registration-operator
value: ./build/Dockerfile.registration-operator.rhtap
- name: git-url
value: '{{repo_url}}'
- name: output-image
Expand Down
2 changes: 1 addition & 1 deletion .tekton/registration-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.registration
value: ./build/Dockerfile.registration.rhtap
- name: git-url
value: '{{repo_url}}'
- name: image-expires-after
Expand Down
2 changes: 1 addition & 1 deletion .tekton/registration-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.registration
value: ./build/Dockerfile.registration.rhtap
- name: git-url
value: '{{repo_url}}'
- name: output-image
Expand Down
2 changes: 1 addition & 1 deletion .tekton/work-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.work
value: ./build/Dockerfile.work.rhtap
- name: git-url
value: '{{repo_url}}'
- name: image-expires-after
Expand Down
2 changes: 1 addition & 1 deletion .tekton/work-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
spec:
params:
- name: dockerfile
value: ./build/Dockerfile.work
value: ./build/Dockerfile.work.rhtap
- name: git-url
value: '{{repo_url}}'
- name: output-image
Expand Down
17 changes: 17 additions & 0 deletions build/Dockerfile.addon.rhtap
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
ARG OS=linux
ARG ARCH=amd64
WORKDIR /go/src/open-cluster-management.io/ocm
COPY . .
ENV GO_PACKAGE open-cluster-management.io/ocm

RUN GOOS=${OS} \
GOARCH=${ARCH} \
GO_BUILD_PACKAGES=./cmd/addon \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ENV USER_UID=10001
COPY --from=builder /go/src/open-cluster-management.io/ocm/addon /

USER ${USER_UID}
18 changes: 18 additions & 0 deletions build/Dockerfile.placement.rhtap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
ARG OS=linux
ARG ARCH=amd64
WORKDIR /go/src/open-cluster-management.io/ocm
COPY . .
ENV GO_PACKAGE open-cluster-management.io/ocm

RUN GOOS=${OS} \
GOARCH=${ARCH} \
GO_BUILD_PACKAGES=./cmd/placement \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/placement /

USER ${USER_UID}
18 changes: 18 additions & 0 deletions build/Dockerfile.registration-operator.rhtap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
ARG OS=linux
ARG ARCH=amd64
WORKDIR /go/src/open-cluster-management.io/ocm
COPY . .
ENV GO_PACKAGE open-cluster-management.io/ocm

RUN GOOS=${OS} \
GOARCH=${ARCH} \
GO_BUILD_PACKAGES=./cmd/registration-operator \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/registration-operator /

USER ${USER_UID}
18 changes: 18 additions & 0 deletions build/Dockerfile.registration.rhtap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
ARG OS=linux
ARG ARCH=amd64
WORKDIR /go/src/open-cluster-management.io/ocm
COPY . .
ENV GO_PACKAGE open-cluster-management.io/ocm

RUN GOOS=${OS} \
GOARCH=${ARCH} \
GO_BUILD_PACKAGES=./cmd/registration \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/registration /

USER ${USER_UID}
18 changes: 18 additions & 0 deletions build/Dockerfile.work.rhtap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.20 AS builder
ARG OS=linux
ARG ARCH=amd64
WORKDIR /go/src/open-cluster-management.io/ocm
COPY . .
ENV GO_PACKAGE open-cluster-management.io/ocm

RUN GOOS=${OS} \
GOARCH=${ARCH} \
GO_BUILD_PACKAGES=./cmd/work \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/work /

USER ${USER_UID}

0 comments on commit c12a94b

Please sign in to comment.