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

Configuring dockerfile for rhtap build #61

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

tommyd450
Copy link

No description provided.

Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about calling go mod vendor and go install in a hermetic environment. I don't see how that will work.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@tommyd450
Copy link
Author

/retest

@tommyd450 tommyd450 force-pushed the gammaConfig branch 3 times, most recently from be9bd1b to 5a5d605 Compare November 30, 2023 11:30
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@tommyd450
Copy link
Author

/retest

@tommyd450
Copy link
Author

/retest

@tommyd450
Copy link
Author

/retest

Copy link

@Gregory-Pereira Gregory-Pereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
Everything looks great, I approve these changes as is. I had some additional optimization suggestions if you are interested, but if you dont want to fight with tests again feel free to merge what you have here.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Dockerfile Outdated
# Add source code
ADD ./cmd/ $APP_ROOT/src/cmd/
ADD ./pkg/ $APP_ROOT/src/pkg/
COPY . .
Copy link

@Gregory-Pereira Gregory-Pereira Dec 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I recommend you swap out the COPY command for ADD. If you keep the strategy they started with, the image should be significantly smaller as you dont have to load every file from the directory in, only the ones used for go package management and building the binary. This should work if you create the directories as mentioned above.

Suggested change
COPY . .
ADD go.mod go.sum $APP_ROOT/src/
RUN go mod download
# Add source code
ADD ./cmd/ $APP_ROOT/src/cmd/
ADD ./pkg/ $APP_ROOT/src/pkg/

Copy link

openshift-ci bot commented Dec 2, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Gregory-Pereira, tommyd450

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

openshift-ci bot commented Dec 5, 2023

New changes are detected. LGTM label has been removed.

@lance
Copy link
Member

lance commented Dec 5, 2023

@Gregory-Pereira your comments are useful. I'm going to go ahead and merged so we can make progress, and then these kinds of changes @tommyd450 can pick up in spare cycles.

@lance lance merged commit bb9f548 into securesign:redhat-v1.2 Dec 5, 2023
8 of 9 checks passed
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

Successfully merging this pull request may close these issues.

3 participants