Skip to content

Commit f47ab7b

Browse files
committed
Remove the redundant --platform from the Dockerfile
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent d5b609c commit f47ab7b

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.github/containers/test-installation/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This Dockerfile is used to test the installation of the python package in
55
# multiple platforms in the CI. It is not used to build the package itself.
66

7-
FROM --platform=${TARGETPLATFORM} python:3.11-slim
7+
FROM python:3.11-slim
88

99
RUN apt-get update -y && \
1010
apt-get install --no-install-recommends -y \

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* Added a new default option `asyncio_default_fixture_loop_scope = "function"` for `pytest-asyncio` as not providing a value is deprecated.
2929
* The migration script is now written in Python, so it should be (hopefully) more compatible with different OSes.
3030
* Disable more `pylint` checks that are also checked by `mypy` to avoid false positives.
31+
* Remove the redundant `--platform` from the testing dockerfile.
3132

3233
## Bug Fixes
3334

cookiecutter/migrate.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,17 @@ def main() -> None:
166166

167167
# Add new pylint checks
168168
add_pylint_checks()
169+
print("=" * 72)
170+
171+
# Remove redundant --platform from the dockerfile
172+
dockerfile = Path(".github/containers/test-installation/Dockerfile")
173+
print(f"{dockerfile}: Removing redundant --platform.")
174+
if dockerfile.is_file():
175+
replace_file_contents_atomically(
176+
dockerfile, "--platform=${TARGETPLATFORM} ", ""
177+
)
178+
else:
179+
print(f"{dockerfile}: Not found.")
169180

170181
# Add a separation line like this one after each migration step.
171182
print("=" * 72)

cookiecutter/{{cookiecutter.github_repo_name}}/.github/containers/test-installation/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This Dockerfile is used to test the installation of the python package in
66
# multiple platforms in the CI. It is not used to build the package itself.
77

8-
FROM --platform=${TARGETPLATFORM} python:3.11-slim
8+
FROM python:3.11-slim
99

1010
RUN apt-get update -y && \
1111
apt-get install --no-install-recommends -y \

0 commit comments

Comments
 (0)