Skip to content

Commit 8e49d3d

Browse files
committed
feat: build custom image
1 parent 9941710 commit 8e49d3d

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

Dockerfile

+17-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
FROM renovate/renovate:35.0.0-slim@sha256:4ff005a44c23692160989829a092bdc2fdc7283349017cebd3e4d4132ae435c6
1+
# renovate: datasource=npm depName=renovate versioning=npm
2+
ARG RENOVATE_VERSION=35.0.0
23

3-
LABEL maintainer="Michael Kriese <[email protected]>"
4+
# Base image
5+
#============
6+
FROM ghcr.io/containerbase/buildpack:6.4.0@sha256:2d3a47f481b3ee882519506e580483410c5e18f5c68d16081f86c7b65f47a0a9 AS base
47

5-
USER root
8+
LABEL maintainer="Michael Kriese <[email protected]>"
9+
LABEL name="renovate"
10+
# get changelog from renovate
11+
LABEL org.opencontainers.image.source="https://github.com/renovatebot/renovate" \
12+
org.opencontainers.image.licenses="AGPL-3.0-only"
613

714
RUN prepare-tool java gradle
815

@@ -12,11 +19,14 @@ RUN install-tool node 18.15.0
1219
# renovate: datasource=npm
1320
RUN install-tool corepack 0.17.0
1421

15-
# renovate: datasource=dotnet lookupName=dotnet-sdk
22+
# renovate: datasource=dotnet-version lookupName=dotnet-sdk
1623
RUN install-tool dotnet 7.0.201
1724

1825

19-
USER ${USER_ID}
26+
ARG RENOVATE_VERSION
2027

21-
# use install mode
22-
ENV RENOVATE_BINARY_SOURCE=install
28+
RUN install-tool renovate
29+
30+
LABEL org.opencontainers.image.version="${RENOVATE_VERSION}"
31+
32+
USER ${USER_ID}

bin/init.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
set -eo pipefail
33

4-
FROM=$(grep 'FROM renovate/renovate:' Dockerfile)
5-
SEMVER_REGEX=":(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)-"
4+
FROM=$(grep 'RENOVATE_VERSION=' Dockerfile)
5+
SEMVER_REGEX=":(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
66

77

88
if ! [[ "$FROM" =~ $SEMVER_REGEX ]]; then

0 commit comments

Comments
 (0)