-
Notifications
You must be signed in to change notification settings - Fork 455
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
Improve dockerfiles #224
Improve dockerfiles #224
Conversation
@Niek - could you review this PR as well? |
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.
What about changes to the https://github.com/microsoft/garnet/blob/main/.github/workflows/docker.yml file? Caching can be enabled there, as well as adding the other docker files as separate tags.
Setting up CI pipeline for docker layer caching is not part of this PR. I'm not very familiar with Github Actions, but my next PR could be about it. This PR only contains Dockerfile best practices. |
Fair enough re GitHub workflows. One more nitpick: the dockerignore doesn't add much value it seems, since there is no wildcard copy any longer in the dockerfiles. |
In addition to excluding Dockerfiles, we've also omitted future possible docker-compose and README files from the dockerignore. While the few KB saved might not seem significant for GitHub Actions, the value is considerably higher in the context of the development environment. For instance, when I build the solution and then create a Docker image in my local environment, excluding the bin and obj folders from the build context, as highlighted in #20, proves to be quite beneficial. As I mentioned before, it's a best practice and having a |
Good comments and discussions, thanks to both of you! |
@akoken, thank you for contributing to Garnet. I built and run all Linux dokerfiles successfully but Dockerfile.nanoserver is failed to build. I've added the comment for this file. Could you please take a look. |
Hi @irinasp It should be fixed now. |
Hi @akoken, I built and run the fixed version of Dockerfile.nanoserver but it is still failing to build. I've added the comment. Could you please take a look. |
Hi @irinasp I'm sorry for inconveniencing you. Since my development environment isn't on Windows, I have been unable to replicate the issue. Would you kindly consider testing the latest change I made? If the issue persists, I believe I may need to create a virtual machine to conduct further testing. |
@akoken, there are a lot of warnings while building the image from the dockerfile with your new fix. And there is the error while running the container: Would you consider removing the update for Dockerfile.nanoserver from this PR and do separate PR for windows dockerfile after tunning the changes? |
I was thinking the same way @irinasp. I reverted the change for nanoserver. Thanks for your help! |
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 changes for all Linux dockerfiles are tested. Dockerfile.nanoserver is reverted to original version.
This PR contains the following changes.
dotnet restore
command runs even though you haven't changed anything in the csproj file.