Commit 2f93501
authored
Force docker build to clean up repeated layers (#4434)
## Motivation and Context
Works around the `failed to register layer: max depth exceeded` error on
`docker pull`
## Description
Force building an docker image removes repeated image layers
```
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
...
```
whose layer contents include
```
Command:
RUN |1 USER_ID=1001 /bin/sh -c useradd -l -u ${USER_ID} -G build -o -s /bin/bash localbuild || { exit_code=$?; [ $exit_code -eq 9 ] && echo "User localbuild already exists, continuing..." || { echo "Failed to create user with error code: $exit_code"; exit $exit_code; }; } # buildkit
```
The layer seems to be added
[here](https://github.com/smithy-lang/smithy-rs/blob/42d082f37b28d900885070342be710d287bc1dcc/.github/scripts/acquire-build-image#L256).
Will describe more in an ops issue we'll be creating. This PR just
unblocks PRs that need to run CI.
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._1 parent 42d082f commit 2f93501
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | 229 | | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
0 commit comments