-
Notifications
You must be signed in to change notification settings - Fork 156
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
Document usage with a Dockerfile #295
Conversation
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, thank you for your PR.
I've commented on files for 2.5
, but that applies for all versions. Please check those issues.
In general it looks good!
@@ -0,0 +1,10 @@ | |||
FROM ubi8/ruby-25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this file be in the 2.5
directory of this repo, not to repeateat another directory structure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an example and it belongs into the example directory, versions are there only due to tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but with Ruby f.e. we call this a fixture
and it belongs right next to the tests.... I don't see why to add versioned examples when we have already versioned folders. It seems like enforced structure, because you wan't examples separated? But then again, shouldn't those be there for the ppl to use as a reference with the container? (Do they somehow iterfere with the resulting container?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still against versioned examples, inside this repo, when we have already versioned folders for the respective Ruby versions. @hhorak @voxik WDYT?
What I think:
- The Ruby Dockerfile examples should not be versioned. Same way as the example application is not versioned.
- If it's aimed only on testing, it should be inside the Versioned (Ruby) folder, inside either
test
orfixtures
folder (see above).
Note that if there's a worry to have an actual Dockerfile which is built for the specific version, we can use Docker ARGs, like this:
https://github.com/pvalena/tmt-all/blob/master/Dockerfile#L1
Build would look like:
$ podman build --build-arg FROM='27' .
# or
$ podman build --build-arg FROM='ubi8/ruby-27' .
# or
$ podman build --build-arg FROM='ruby-27' .
Depending on what remains in Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
[test] |
@fila43 Please incorporate this change: #295 (comment) |
@pvalena I have applied your suggestions from #295 (comment) |
[test] |
[test] |
@fila43 closed by mistake? |
@pvalena yes, I am going to reopen it. |
(For a minute I thought you've opened another PR with this content.) Could do rebase + force push? That's IMO a good practise for any PR.
Is a great helper with that. |
I have merged #301. Please rebase it. The conu tests should be fixed by this PR. |
@phracek thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've proposed previously discussed text reformulation (sorry the suggestion took so long), together with fixes for the links (they're broken).
I'm also against using versioned examples-dockerfile
(or something like that) folder, together with proposal for the location change. There're several ways to solve first mentioned.
2.5/README.md
Outdated
* installing the dependencies | ||
* setting the default command in the resulting image | ||
|
||
For all these three parts, users can either setup all manually and use commands `ruby`, `bundle` and `rackup` explicitly in the Dockerfile ([3.1.](#31-to-use-your-own-setup-create-a-dockerfile-with-this-content)), or users can use the Source-to-Image scripts inside the image ([3.2.](#32-to-use-the-source-to-image-scripts-and-build-an-image-using-a-dockerfile-create-a-dockerfile-with-this-content); see more about these scripts in the section "Source-to-Image framework and scripts" above), that already know how to set-up and run some common Ruby applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all these three parts, users can either setup all manually and use commands `ruby`, `bundle` and `rackup` explicitly in the Dockerfile ([3.1.](#31-to-use-your-own-setup-create-a-dockerfile-with-this-content)), or users can use the Source-to-Image scripts inside the image ([3.2.](#32-to-use-the-source-to-image-scripts-and-build-an-image-using-a-dockerfile-create-a-dockerfile-with-this-content); see more about these scripts in the section "Source-to-Image framework and scripts" above), that already know how to set-up and run some common Ruby applications. | |
For all these three parts, users can either setup all manually and use commands `ruby`, `bundle` and `rackup` explicitly in the Dockerfile ([3.1.](#31-to-use-the-source-to-image-scripts-and-build-an-image-using-a-dockerfile-create-a-dockerfile-with-this-content)), or users can use the Source-to-Image scripts inside the image ([3.2.](#32-to-use-your-own-setup-create-a-dockerfile-with-this-content). |
Fixed links.
Also moved the last sentence to appropriate section bellow.
@@ -0,0 +1,10 @@ | |||
FROM ubi8/ruby-25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still against versioned examples, inside this repo, when we have already versioned folders for the respective Ruby versions. @hhorak @voxik WDYT?
What I think:
- The Ruby Dockerfile examples should not be versioned. Same way as the example application is not versioned.
- If it's aimed only on testing, it should be inside the Versioned (Ruby) folder, inside either
test
orfixtures
folder (see above).
Note that if there's a worry to have an actual Dockerfile which is built for the specific version, we can use Docker ARGs, like this:
https://github.com/pvalena/tmt-all/blob/master/Dockerfile#L1
Build would look like:
$ podman build --build-arg FROM='27' .
# or
$ podman build --build-arg FROM='ubi8/ruby-27' .
# or
$ podman build --build-arg FROM='ruby-27' .
Depending on what remains in Dockerfile.
bee7d32
to
751a660
Compare
[test] |
[test] |
@pvalena I hope now it's ready |
[test] |
1 similar comment
[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only comment is the one bellow, but that can be handled separately.
Thanks!
Edit documentation - add section from dockerfile Enable testing from dockerfile example app (rails-ex) Update common scripts to master
[test] |
This adds the following:
This is a similar pull-request as sclorg/httpd-container#99., sclorg/nodejs-container#247 and sclorg/perl-container#192
To see the formatted README.md, see https://github.com/fila43/s2i-ruby-container/blob/master/2.5/README.md and it is also visible on the catalog, which will be the most important view: https://catalog.redhat.com/software/containers/rhel8/ruby-25/5ba0ae3bbed8bd6ee81985ea