forked from knative/client
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-v0.25.1] Remove python http server from artifact image (knat…
…ive#835) * [release-v0.25.1] Remove python http server from artifact image * Fix duplicate package install
- Loading branch information
Showing
2 changed files
with
16 additions
and
71 deletions.
There are no files selected for viewing
31 changes: 16 additions & 15 deletions
31
openshift/ci-operator/knative-images/client/Dockerfile.cliartifacts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest | ||
# we'd need to create WORKDIR before hand to workaround image builder issue | ||
# on OCP 3.11 where it requires it present before referencing | ||
RUN mkdir -p /opt/app-root/src/go/src/github.com/knative/client | ||
FROM registry.ci.openshift.org/ocp/ubi-minimal:8 AS packager | ||
WORKDIR /opt/app-root/src/go/src/github.com/knative/client | ||
RUN microdnf install -y zip tar gzip python3 | ||
ADD package_cliartifacts.sh LICENSE kn-*-* serve.py ./ | ||
RUN bash package_cliartifacts.sh && \ | ||
mkdir -p /usr/share/kn/{linux_{amd64,arm64,ppc64le,s390x},macos,windows} && \ | ||
mv kn-linux-amd64.tar.gz /usr/share/kn/linux_amd64/ && \ | ||
mv kn-linux-arm64.tar.gz /usr/share/kn/linux_arm64/ && \ | ||
mv kn-linux-ppc64le.tar.gz /usr/share/kn/linux_ppc64le/ && \ | ||
mv kn-linux-s390x.tar.gz /usr/share/kn/linux_s390x/ && \ | ||
mv kn-macos-amd64.tar.gz /usr/share/kn/macos/ && \ | ||
mv kn-windows-amd64.zip /usr/share/kn/windows/ | ||
CMD ["python3", "serve.py"] | ||
|
||
ADD package_cliartifacts.sh LICENSE kn-*-* ./ | ||
RUN microdnf install -y zip tar gzip && \ | ||
bash package_cliartifacts.sh | ||
|
||
FROM registry.ci.openshift.org/ocp/ubi-minimal:8 | ||
WORKDIR /opt/app-root/src/go/src/github.com/knative/client | ||
RUN mkdir -p /usr/share/kn/{linux_amd64,linux_arm64,linux_ppc64le,linux_s390x,macos,windows} | ||
|
||
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-amd64.tar.gz /usr/share/kn/linux_amd64/ | ||
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-ppc64le.tar.gz /usr/share/kn/linux_ppc64le/ | ||
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-s390x.tar.gz /usr/share/kn/linux_s390x/ | ||
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-macos-amd64.tar.gz /usr/share/kn/macos/ | ||
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-windows-amd64.zip /usr/share/kn/windows/ | ||
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/LICENSE /usr/share/kn/LICENSE |