Files
renovate/tools/docker/Dockerfile
T
renovate[bot] bd8f755bc1 fix(deps): update renovate-base-image to v13.139.3 (main) (#47291)
fix(deps): update renovate-base-image to v13.139.3

| datasource | package                        | from     | to       |
| ---------- | ------------------------------ | -------- | -------- |
| npm        | @renovatebot/base-image        | 13.139.1 | 13.139.3 |
| docker     | ghcr.io/renovatebot/base-image | 13.139.1 | 13.139.3 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-22 12:20:42 +00:00

122 lines
3.7 KiB
Docker

# syntax=docker/dockerfile:1.28.0@sha256:bb22d9815c728170f72750f4e5b0d672e06176142e1d602c7e66c050100b7e5b
ARG BASE_IMAGE_TYPE=slim
# --------------------------------------
# slim image
# --------------------------------------
FROM ghcr.io/renovatebot/base-image:13.139.3@sha256:7dbb360f1501547d55bcd68c4d92a60e97705e1a01b229ce9b3c10225d6b425c AS slim-base
# --------------------------------------
# full image
# --------------------------------------
FROM ghcr.io/renovatebot/base-image:13.139.3-full@sha256:1fc6d15e33786f7af7617974c454c70f9125ad1895b2b2848c5b019263d86c4c AS full-base
ENV RENOVATE_BINARY_SOURCE=global
# --------------------------------------
# build image
# --------------------------------------
FROM --platform=$BUILDPLATFORM ghcr.io/renovatebot/base-image:13.139.3@sha256:7dbb360f1501547d55bcd68c4d92a60e97705e1a01b229ce9b3c10225d6b425c AS build
# We want a specific node version here
# renovate: datasource=github-releases packageName=containerbase/node-prebuild versioning=node
RUN install-tool node 24.22.1
# corepack is too buggy 😞
# renovate: datasource=npm
RUN install-tool pnpm 11.28.5
WORKDIR /usr/local/renovate
ARG TARGETPLATFORM
ARG TARGETARCH
ARG BUILDPLATFORM
RUN set -ex; \
echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"; \
uname -a; \
true
# replace `amd64` with `x86_64` for `node`
ENV ARCH=${TARGETARCH/amd64/x86_64}
ENV ARCH=${ARCH/arm64/aarch64}
# fetch static node binary
RUN set -ex; \
ver=$(node --version); ver=${ver:1} \
temp_dir="$(mktemp -d)"; \
curl -fsSL "https://github.com/containerbase/node-prebuild/releases/download/${ver}/node-${ver}-${ARCH}.tar.xz" -o ${temp_dir}/node.tar.xz; \
bsdtar --strip 1 -C ${temp_dir} -xf ${temp_dir}/node.tar.xz; \
cp ${temp_dir}/bin/node ./node; \
true
# prepare pnpm env
ENV CI=1 pnpm_config_modules_cache_max_age=0 \
pnpm_config_loglevel=info
# replace `amd64` with `x64` for `node`
ENV ARCH=${TARGETARCH/amd64/x64}
# set `npm_config_arch` for `prebuild-install`
# set `npm_config_platform_arch` for `install-artifact-from-github`
ENV npm_config_arch=${ARCH} npm_config_platform_arch=${ARCH}
COPY --link patches ./patches
COPY --link pnpm-lock.yaml ./
COPY --link pnpm-workspace.yaml ./
# only fetch deps from lockfile https://pnpm.io/cli/fetch
RUN set -ex; \
pnpm fetch --prod --ignore-scripts; \
true
COPY --link . ./
# install npm packages
RUN set -ex; \
pnpm install --prod --offline --ignore-scripts; \
pnpm rebuild re2; \
true
# --------------------------------------
# final image
# --------------------------------------
FROM ${BASE_IMAGE_TYPE}-base
LABEL name="renovate"
LABEL org.opencontainers.image.source="https://github.com/renovatebot/renovate" \
org.opencontainers.image.url="https://renovatebot.com" \
org.opencontainers.image.licenses="AGPL-3.0-only"
WORKDIR /usr/src/app
COPY tools/docker/bin/ /usr/local/sbin/
ENTRYPOINT ["/usr/local/sbin/renovate-entrypoint.sh"]
CMD ["renovate"]
ARG RENOVATE_VERSION
COPY --link --from=build --chown=root:root /usr/local/renovate/ /usr/local/renovate/
# make our node binary available as last in path
RUN ln -sf /usr/local/renovate/node /bin/node
# ensure default base and cache directories exist.
# /runner/cache is an alternative cache directory used in both Docker and microVMs.
RUN mkdir -p /tmp/renovate/cache/renovate/repository /runner/cache/renovate/repository && \
chmod -R 777 /tmp/renovate /runner
# test
RUN set -ex; \
renovate --version; \
pushd /usr/local/renovate/; \
node -e "new require('re2')('.*').exec('test')"; \
true
LABEL \
org.opencontainers.image.version="${RENOVATE_VERSION}" \
org.label-schema.version="${RENOVATE_VERSION}"
# Numeric user ID for the ubuntu user. Used to indicate a non-root user to OpenShift
USER 12021