-
Notifications
You must be signed in to change notification settings - Fork 24
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
use ubi8 container base image #195
Conversation
Codecov Report
@@ Coverage Diff @@
## main #195 +/- ##
==========================================
- Coverage 58.25% 58.16% -0.09%
==========================================
Files 58 58
Lines 3349 3361 +12
==========================================
+ Hits 1951 1955 +4
- Misses 1269 1276 +7
- Partials 129 130 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
During testing: Not sure why permission is denied. Commented out the command |
@jotak can you please check this PR ... is there a better way to get golang 1.17 ??? |
contrib/docker/Dockerfile
Outdated
@@ -12,7 +21,7 @@ RUN go mod download | |||
RUN go mod download -modfile=.bingo/golangci-lint.mod | |||
|
|||
COPY . ./ | |||
RUN rm -rf bin | |||
#RUN rm -rf bin |
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.
The need to delete the bin folder is to make sure that we are re-building/downloading the binaries using .bingo. when we build the container image and not use the downloaded ones from git
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 think a better way to get rid of the bin directory in the docker image is to add a .dockerignore
file to the repository with a line to exclude bin/
.
https://docs.docker.com/engine/reference/builder/#dockerignore-file
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.
Regarding the timeouts in the e2e tests, I recommend adding logging of timestamps in strategic places so we could measure which parts takes the most time to run.
contrib/docker/.dockeringnore
Outdated
@@ -0,0 +1,2 @@ | |||
.git | |||
/bin/ |
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.
The .dockerignore
is not processed because of:
- Typo in filename:
.dockeringnore
:.dockerignore
- It should be in the root directory of the repository.
contrib/docker/.dockeringnore
Outdated
@@ -0,0 +1,2 @@ | |||
.git | |||
/bin/ |
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 think it's better to strip the leading slash /
to avoid confusion with root.
contrib/docker/.dockeringnore
Outdated
@@ -0,0 +1,2 @@ | |||
.git | |||
/bin/ |
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 found that there is an inconsistency between docker
and podman
regarding handling .dockerignore
.
While both process it when it is in the repo's root directory, docker
also allows <dockerfile-name>.dockerignore
https://stackoverflow.com/a/57774684/2749989
about the go-toolset image and go1.17: we have the same workaround on other images. Maybe we can have our own "netobserv/go-toolset" image to avoid fixing all components one by one ... |
@KalmanMeth @eranra the final stage here is still using ubuntu, I think we need either to change all stages to ubi8, or none (the whole purpose being to have a common base across components to make it easier to maintain / check vulnerabilities & upgrades). But to be honest, I see also that there's included some net tools with the image, I don't want to force moving to ubi8 if you have the tooling you want with this current Dockerfile, the goal is not to make troubleshooting harder. |
@KalmanMeth what we want to make sure is that even with ubi8 we still have the simple tools to understand processes and networks. I also assume that the ubi8 image do not include or allow any package manager such as yum or apt so what I propose is to copy get those tools in the builder stage and make sure that we copy them into the ubi container. Exacely like what we are doing to the executables we compile https://github.com/netobserv/flowlogs-pipeline/pull/195/files#diff-e818f6b11598d2656922413d3912abb820c175e2f739549dbda55cc9559bd6fdL28 This will allow us on one hand to work with ubi8 as needed for security but have those tools handy if needed. @jotak does this make sense and acceptable? |
thanks @KalmanMeth @eranra and sorry for the delay 😬 /lgtm |
No description provided.