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

Only copy agent code in dockerfiles #3393

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

jamshale
Copy link
Contributor

@jamshale jamshale commented Dec 9, 2024

The dockerfiles don't need to copy the entire repo into the base, run, and test images. They should only copy the project files and the actual agent code.

Found some old aries_cloudagent naming that should be updated.

Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Signed-off-by: jamshale <jamiehalebc@gmail.com>
Copy link
Contributor

@WadeBarnes WadeBarnes left a comment

Choose a reason for hiding this comment

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

The other way to handle this, which is possibly more manageable long term, is with .dockerignore files, which seem to already be in use; https://github.com/openwallet-foundation/acapy/blob/main/.dockerignore

image

It might be an idea to add a comment in the dockerfiles referencing the .dockerignore filtering their content. That way it's clear where the content of the dockerfile is controlled.

@jamshale
Copy link
Contributor Author

It might be an idea to add a comment in the dockerfiles referencing the .dockerignore filtering their content. That way it's clear where the content of the dockerfile is controlled.

Sounds good. I wasn't aware of that. I will do an overview of this.

@jamshale
Copy link
Contributor Author

I'm somewhat confused as to why the demo code is included. Seems like there's a lot of code there that shouldn't be.

@WadeBarnes
Copy link
Contributor

I'm somewhat confused as to why the demo code is included. Seems like there's a lot of code there that shouldn't be.

That screenshot is just a list showing all of the places a .dockerignore file are being used in the project.

@jamshale
Copy link
Contributor Author

I'll rebase and test this a bit more. I think it would be good to have.

The .dockerignore file doesn't really help us because it applies to every Dockerfile in the docker folder, and different files are included for the different images. A comment mentioning those files are also ignored would be good to have, though.

Copy link

sonarqubecloud bot commented Jan 14, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@jamshale
Copy link
Contributor Author

I tried to test all usages of these dockerfiles I could think of. There's a chance that a process I don't know about expects the files I removed to be there and will break and would need to be added back.

The most important ones are used in automatic testing.

@jamshale jamshale merged commit dea4e09 into openwallet-foundation:main Jan 14, 2025
11 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