-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to fix main: separate clean in windows docker images (#6671)
- Loading branch information
Showing
2 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -10,7 +10,12 @@ SHELL ["cmd", "/S", "/C"] | |
# Creating new layers can be really slow on Windows so we clean up any caches | ||
# we can before moving on to the next step. | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} make generate-ui && rm -rf web/ui/node_modules && yarn cache clean --all"" | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS='builtinassets' make agent && go clean -cache -modcache"" | ||
|
||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} GO_TAGS='builtinassets' make agent"" | ||
# In this case, we're separating the clean command from make agent to avoid an issue where access to some mod cache | ||
# files is denied immediately after make agent, for example: | ||
# "go: remove C:\go\pkg\mod\golang.org\[email protected]\bin\go.exe: Access is denied." | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache"" | ||
|
||
# Use the smallest container possible for the final image | ||
FROM mcr.microsoft.com/windows/nanoserver:1809 | ||
|
This file contains 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 |
---|---|---|
|
@@ -7,9 +7,11 @@ WORKDIR /src/agent | |
|
||
SHELL ["cmd", "/S", "/C"] | ||
|
||
# Creating new layers can be really slow on Windows so we clean up any caches | ||
# we can before moving on to the next step. | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} make agentctl && go clean -cache -modcache"" | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} make agentctl"" | ||
# We're separating the clean command from make agent to avoid an issue where access to some mod cache | ||
# files is denied immediately after make agentctl, for example: | ||
# "go: remove C:\go\pkg\mod\golang.org\[email protected]\bin\go.exe: Access is denied." | ||
RUN ""C:\Program Files\git\bin\bash.exe" -c "go clean -cache -modcache"" | ||
|
||
# Use the smallest container possible for the final image | ||
FROM mcr.microsoft.com/windows/nanoserver:1809 | ||
|