Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to deploy nginx 1.18 example on OCP 4.7 #152

Open
mJace opened this issue Jun 30, 2021 · 5 comments
Open

Failed to deploy nginx 1.18 example on OCP 4.7 #152

mJace opened this issue Jun 30, 2021 · 5 comments

Comments

@mJace
Copy link

mJace commented Jun 30, 2021

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"
@phracek
Copy link
Member

phracek commented Jun 30, 2021

@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.

@mJace
Copy link
Author

mJace commented Jul 1, 2021

@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.

@nathanweeks
Copy link

nathanweeks commented Jan 9, 2023

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/

@phracek
Copy link
Member

phracek commented Jun 10, 2024

Hi @nathanweeks , would you be willing to file a PR that will fix documentation? Thanks

@nathanweeks
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants