Skip to content

Commit

Permalink
Remove the redundant --platform from the Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
  • Loading branch information
llucax committed Nov 20, 2024
1 parent 58c31fb commit 3706326
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/containers/test-installation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This Dockerfile is used to test the installation of the python package in
# multiple platforms in the CI. It is not used to build the package itself.

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

RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
Expand Down
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* Added a new default option `asyncio_default_fixture_loop_scope = "function"` for `pytest-asyncio` as not providing a value is deprecated.
* The migration script is now written in Python, so it should be (hopefully) more compatible with different OSes.
* Disable more `pylint` checks that are also checked by `mypy` to avoid false positives.
* Remove the redundant `--platform` from the testing dockerfile.

## Bug Fixes

Expand Down
11 changes: 11 additions & 0 deletions cookiecutter/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ def main() -> None:

# Add new pylint checks
add_pylint_checks()
print("=" * 72)

# Remove redundant --platform from the dockerfile
dockerfile = Path(".github/containers/test-installation/Dockerfile")
print(f"{dockerfile}: Removing redundant --platform.")
if dockerfile.is_file():
replace_file_contents_atomically(
dockerfile, "--platform=${TARGETPLATFORM} ", ""
)
else:
print(f"{dockerfile}: Not found.")

# Add a separation line like this one after each migration step.
print("=" * 72)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This Dockerfile is used to test the installation of the python package in
# multiple platforms in the CI. It is not used to build the package itself.

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

RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This Dockerfile is used to test the installation of the python package in
# multiple platforms in the CI. It is not used to build the package itself.

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

RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This Dockerfile is used to test the installation of the python package in
# multiple platforms in the CI. It is not used to build the package itself.

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

RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This Dockerfile is used to test the installation of the python package in
# multiple platforms in the CI. It is not used to build the package itself.

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

RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This Dockerfile is used to test the installation of the python package in
# multiple platforms in the CI. It is not used to build the package itself.

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

RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This Dockerfile is used to test the installation of the python package in
# multiple platforms in the CI. It is not used to build the package itself.

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

RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
Expand Down

0 comments on commit 3706326

Please sign in to comment.