-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
64 lines (43 loc) · 1.77 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM ghcr.io/swissgrc/azure-pipelines-node:22.13.1-net8 AS base
FROM base AS build
# Make sure to fail due to an error at any stage in shell pipes
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# renovate: datasource=repology depName=debian_12/curl versioning=deb
ENV CURL_VERSION=7.88.1-10+deb12u8
RUN apt-get update -y && \
# Install necessary dependencies
apt-get install -y --no-install-recommends curl=${CURL_VERSION}
# Install the Flux CLI
# renovate: datasource=github-releases depName=fluxcd/flux2 extractVersion=^v(?<version>.*)$
ENV FLUX_VERSION=2.4.0
RUN curl -s https://fluxcd.io/install.sh | FLUX_VERSION=${FLUX_VERSION} bash
FROM base AS final
LABEL org.opencontainers.image.vendor="Swiss GRC AG"
LABEL org.opencontainers.image.authors="Swiss GRC AG <[email protected]>"
LABEL org.opencontainers.image.title="azure-pipelines-renovate"
LABEL org.opencontainers.image.documentation="https://github.com/swissgrc/docker-azure-pipelines-renovate"
# Make sure to fail due to an error at any stage in shell pipes
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /
# Smoke test prerequisites
RUN git version && \
dotnet --version
# Install Renovate
# renovate: datasource=npm depName=renovate
ENV RENOVATE_VERSION=39.166.1
# We need to run scripts here to have RE2 installed
RUN npm install -g renovate@${RENOVATE_VERSION} && \
npm cache clean --force && \
# Smoke test
renovate --version
# Install Flux CLI
# Copy Flux CLI from build stage
COPY --from=build /usr/local/bin/flux /usr/local/bin/flux
# Smoke test
RUN flux --version
# Configure Git
RUN git config --global user.email '[email protected]' && \
git config --global user.name 'Renovate Bot'
# Clean up
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*