nginx-container
nginx-container copied to clipboard
Failed to deploy nginx 1.18 example on OCP 4.7
Environment : Openshift 4.7.9 Log
oc new-app nginx:1.18~https://github.com/sclorg/nginx-container.git --context-dir=1.18/test/test-app/
error: the image match "nginx:1.18" for source repository "https://github.com/sclorg/nginx-container.git" does not appear to be a source-to-image builder.
- to attempt to use this image as a source builder, pass "--strategy=source"
- to use it as a base image for a Docker build, pass "--strategy=docker"
@mJace Thanks for the issue. What command oc status --suggest shows? Do you want to use RHEL7 or RHEL8 image?
Can you please add to the oc command following for RHEL8:
oc new-app nginx:1.18-ubi8~https://github.com/sclorg/nginx-container.git --context-dir=1.18/test/test-app/
For RHEL7:
oc new-app nginx:1.18-ubi7~https://github.com/sclorg/nginx-container.git --context-dir=1.18/test/test-app/
The imagestream were slightly changed. We need to update all SCLORG container documentation.
@phracek Hi, Thanks for the help.
Here's the result of oc status --suggest with my original command
❯ oc new-project nginx-debug
Now using project "nginx-debug" on server "https://api.jaliang-ocp4.tamapac.support:6443".
You can add applications to this project with the 'new-app' command. For example, try:
oc new-app rails-postgresql-example
to build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application:
kubectl create deployment hello-node --image=k8s.gcr.io/serve_hostname
❯
❯ oc new-app nginx:1.18~https://github.com/sclorg/nginx-container.git --context-dir=1.18/test/test-app/
error: the image match "nginx:1.18" for source repository "https://github.com/sclorg/nginx-container.git" does not appear to be a source-to-image builder.
- to attempt to use this image as a source builder, pass "--strategy=source"
- to use it as a base image for a Docker build, pass "--strategy=docker"
❯
❯
❯
❯ oc status --suggest
In project nginx-debug on server https://api.jaliang-ocp4.tamapac.support:6443
You have no services, deployment configs, or build configs.
Run 'oc new-app' to create an application.
Both RHEL 8 and 7 are OK, I just need to run an example for testing.
Looks like the docs are still broken. The above example now works for ubi9 as well:
oc new-app nginx:1.20-ubi9~https://github.com/sclorg/nginx-container.git --context-dir=1.20/test/test-app/
Hi @nathanweeks , would you be willing to file a PR that will fix documentation? Thanks
Hi @nathanweeks , would you be willing to file a PR that will fix documentation? Thanks
@phracek: I can look into it, though it may be a little while before I can refresh my memory and test in a newer OpenShift environment.