-
Notifications
You must be signed in to change notification settings - Fork 3
Add documentation on maintaining images #364
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # Updating Images | ||
| As new versions of the software housed in the Docker images are released the | ||
| versions used should be updated. This document describes the process for doing | ||
| that. | ||
|
|
||
| > [!NOTE] | ||
| > This document assumes experience | ||
| > [building the images locally](https://github.com/WebKitForWindows/docker-webkit-dev?tab=readme-ov-file#building-locally). | ||
| > If unfamiliar please attempt to build the images as is before attempting to | ||
| > modify them. | ||
|
|
||
| ## Finding new versions | ||
| Software versions in Dockerfiles are manually determined. Check the software's | ||
| site for updates using the :point_down: table. | ||
|
|
||
| | Software | Download Link | | ||
| |---|:---:| | ||
| | git | https://github.com/git-for-windows/git/releases | | ||
| | perl | https://strawberryperl.com/releases.html | | ||
| | python | https://www.python.org/downloads | | ||
| | pip | https://pypi.org/project/pip | | ||
| | pywin32 | https://pypi.org/project/pywin32 | | ||
| | ruby | https://rubyinstaller.org/downloads | | ||
| | webrick | https://github.com/ruby/webrick/releases | | ||
| | cmake | https://cmake.org/download | | ||
| | ninja | https://ninja-build.org | | ||
| | nuget | https://www.nuget.org/downloads | | ||
| | llvm | https://github.com/llvm/llvm-project/releases | | ||
|
|
||
| Every software in the Dockerfile has a corresponding `_VERSION` environment | ||
| variable. Update this variable to install the newer version. | ||
|
|
||
| Installing the software is done through the | ||
| [WebKitDev PowerShell module](https://www.powershellgallery.com/packages/WebKitDev). | ||
| If the download fails open an | ||
| [issue](https://github.com/WebKitForWindows/powershell-webkit-dev/issues) there. | ||
|
|
||
| > [!Warning] | ||
| > The WebKitDev module expands a filename pattern for the installer. Any changes | ||
| > to the naming scheme will cause download failures. The module may be replaced | ||
| > by [Chocolatey](https://chocolatey.org) in the future. | ||
|
|
||
| ## Building | ||
| Use the `Build-All.ps1` PowerShell script to build the images. Again it expects | ||
| a single argument `-Tag` which specifies the tag to build. | ||
|
|
||
| ```powershell | ||
| ./Build-All -tag 2022 | ||
| ``` | ||
|
|
||
| Executing the script will create all the `webkitdev` images. Most of `RUN` | ||
| commands in the Dockerfiles, minus those installing Visual Studio and the | ||
| Windows SDK, will complete in short order. However, the entire build process may | ||
| require a significant amount of time to complete. | ||
|
|
||
| > [!Warning] | ||
| > Sometimes an updated installer will fail to run within the container. If an | ||
| > installer is taking an abnormal amount of time to complete stop the build, | ||
| > hit `CTRL-C`, and revert the change for that version. If the script gets past | ||
| > that `RUN` command then pin the version by leaving a comment in the | ||
| > Dockerfile. | ||
| > | ||
| > Conversely if a new version appears after pinning try to update the version in | ||
| > case the installation issue is resolved. | ||
|
|
||
| After the script completes run `docker images` and verify the images are present | ||
| and tagged. The created time should be within the time frame of the build. | ||
|
|
||
| ## Verification | ||
| The best way to verify the new images is to run a [buildbot](BUILDBOT.md) | ||
| locally. If that's not possible the `webkitdev/msbuild-2022` image can be used | ||
| to make a build. Follow the instructions on | ||
| [building the Windows WebKit port](https://github.com/WebKitForWindows/docker-webkit-dev?tab=readme-ov-file#building-the-windows-webkit-port). | ||
|
|
||
| If the Buildbot instance runs successfully or the build completes within the | ||
| updated image it is ready to land. | ||
|
|
||
| ## Creating the PR | ||
| With the changes tested locally its time to open a PR. Create a branch | ||
| `tools-YYYY-MM-DD`, where `YYYY-MM-DD` corresponds with the current date. The | ||
| first line of the commit message should be `Update tools`. From there write the | ||
| software and the new version. A commit that follows these rules looks like :point_down:. | ||
|
|
||
| ```text | ||
| Update tools | ||
|
|
||
| pip -> 24.1.1 | ||
| cmake -> 3.30.0 | ||
| llvm -> 18.1.8 | ||
| ``` | ||
|
|
||
| Push the branch and open a PR on the repository. The CI will attempt to build | ||
| the changes and if they pass the PR is ready to merge. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 situation should be concerned when a tag name needs to be specified? Is an appropriate tag defined depending on an OS such as Windows 10, Windows 11 etc?
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.
Hope I addressed this in #367