Skip to content

Commit 9f59cc7

Browse files
committed
Pin base Python image to 3.13.5
Updates the base Python Docker image from python:3.13-alpine3.21 to python:3.13.5-alpine3.21 for consistent builds. Also adds install of rust for arm64 builds, for consistency with other images.
1 parent fea7c77 commit 9f59cc7

File tree

151 files changed

+1168
-486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1168
-486
lines changed

.automation/test/Dockerfile-megalinter-custom

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint
3333
# Build wheel for megalinter python package
3434
##################
3535
FROM ghcr.io/astral-sh/uv:0.7.22 AS uv
36-
FROM python:3.13-alpine3.21 AS build-ml-core
36+
FROM python:3.13.5-alpine3.21 AS build-ml-core
3737
WORKDIR /
3838
COPY --from=uv /uv /uvx /bin/
3939
# Install dependencies
@@ -50,7 +50,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
5050
##################
5151
# Get base image #
5252
##################
53-
FROM python:3.13-alpine3.21
53+
FROM python:3.13.5-alpine3.21
5454

5555
#############################################################################################
5656
## @generated by .automation/build.py using descriptor files, please do not update manually ##

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt
8787
# Build wheel for megalinter python package
8888
##################
8989
FROM ghcr.io/astral-sh/uv:0.8.0 AS uv
90-
FROM python:3.13-alpine3.21 AS build-ml-core
90+
FROM python:3.13.5-alpine3.21 AS build-ml-core
9191
WORKDIR /
92+
ARG TARGETPLATFORM
93+
RUN [ "$TARGETPLATFORM" = "linux/arm64" ] && apk -U --no-cache upgrade && apk add --no-cache curl libgcc build-base musl-dev \
94+
&& curl https://sh.rustup.rs -sSf | sh -s -- -y || true
9295
COPY --from=uv /uv /uvx /bin/
9396
# Install dependencies
9497
RUN --mount=type=cache,target=/root/.cache/uv \
@@ -104,8 +107,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
104107
##################
105108
# Get base image #
106109
##################
107-
FROM python:3.13-alpine3.21
108-
110+
FROM python:3.13.5-alpine3.21
111+
ARG TARGETPLATFORM
109112
#############################################################################################
110113
## @generated by .automation/build.py using descriptor files, please do not update manually ##
111114
#############################################################################################
@@ -1190,6 +1193,7 @@ ENV SWIFT_SWIFTLINT_VERSION=0.59.1
11901193
################################
11911194
COPY --from=build-ml-core pyproject.toml README.md ./
11921195
COPY --from=build-ml-core megalinter /megalinter/
1196+
RUN [ "$TARGETPLATFORM" = "linux/arm64" ] && curl https://sh.rustup.rs -sSf | sh -s -- -y || true
11931197
RUN --mount=type=cache,target=/root/.cache/uv,from=build-ml-core \
11941198
--mount=from=uv,source=/uv,target=/bin/uv \
11951199
uv pip install --system -e .

Dockerfile-custom-flavor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FROM ghcr.io/astral-sh/uv:0.7.19 AS uv
1010
##################
1111
# Get base image #
1212
##################
13-
FROM python:3.13-alpine3.21
13+
FROM python:3.13.5-alpine3.21
1414

1515
RUN apk -U --no-cache upgrade \
1616
&& apk add --no-cache \

Dockerfile-quick

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ FROM $MEGALINTER_BASE_IMAGE as base
1616
# Build wheel for megalinter python package
1717
##################
1818
FROM ghcr.io/astral-sh/uv:0.8.0 AS uv
19-
FROM python:3.13-alpine3.21 AS build-ml-core
19+
FROM python:3.13.5-alpine3.21 AS build-ml-core
2020
WORKDIR /
2121
COPY pyproject.toml .
2222
COPY --from=uv /uv /bin/uv

flavors/c_cpp/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@ FROM lycheeverse/lychee:${SPELL_LYCHEE_VERSION} AS lychee
6060
# Build wheel for megalinter python package
6161
##################
6262
FROM ghcr.io/astral-sh/uv:0.8.0 AS uv
63-
FROM python:3.13-alpine3.21 AS build-ml-core
63+
FROM python:3.13.5-alpine3.21 AS build-ml-core
6464
WORKDIR /
65+
ARG TARGETPLATFORM
66+
RUN [ "$TARGETPLATFORM" = "linux/arm64" ] && apk -U --no-cache upgrade && apk add --no-cache curl libgcc build-base musl-dev \
67+
&& curl https://sh.rustup.rs -sSf | sh -s -- -y || true
6568
COPY --from=uv /uv /uvx /bin/
6669
# Install dependencies
6770
RUN --mount=type=cache,target=/root/.cache/uv \
@@ -77,8 +80,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
7780
##################
7881
# Get base image #
7982
##################
80-
FROM python:3.13-alpine3.21
81-
83+
FROM python:3.13.5-alpine3.21
84+
ARG TARGETPLATFORM
8285
#############################################################################################
8386
## @generated by .automation/build.py using descriptor files, please do not update manually ##
8487
#############################################################################################
@@ -505,6 +508,7 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel
505508
################################
506509
COPY --from=build-ml-core pyproject.toml README.md ./
507510
COPY --from=build-ml-core megalinter /megalinter/
511+
RUN [ "$TARGETPLATFORM" = "linux/arm64" ] && curl https://sh.rustup.rs -sSf | sh -s -- -y || true
508512
RUN --mount=type=cache,target=/root/.cache/uv,from=build-ml-core \
509513
--mount=from=uv,source=/uv,target=/bin/uv \
510514
uv pip install --system -e .

0 commit comments

Comments
 (0)