Skip to content
Snippets Groups Projects
Commit 0729856c authored by Pierre Guinoiseau's avatar Pierre Guinoiseau 💚
Browse files

feat(renovate): regroup all RUN steps into one in the Renovate dockerfile to make the image smaller

parent c9accaf4
No related branches found
No related tags found
No related merge requests found
Pipeline #24767185 passed
Loading
Loading
@@ -15,8 +15,7 @@ ARG GL_COMMON_RENOVATE_YARN_VERSION
ARG GL_COMMON_RENOVATE_PYTHON_VERSION
 
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
ENV ASDF_DIR=/asdf
 
# Install post-upgrade script
COPY ./scripts/post-renovate-upgrade.sh /opt/gitlab/renovate/post-renovate-upgrade.sh
Loading
Loading
@@ -26,41 +25,39 @@ COPY ./scripts/renovate-upgrade-scripts /opt/gitlab/renovate/renovate-upgrade-sc
 
# Some dependencies from https://github.com/pyenv/pyenv/wiki#suggested-build-environment
# required for asdf, and some others as needed
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -yq \
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -yq \
jq curl bash build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev libyaml-dev wget unzip \
ca-certificates openssh-client lsb-release rsync gettext-base
ca-certificates openssh-client lsb-release rsync gettext-base \
 
RUN install-tool git "${GL_COMMON_RENOVATE_GIT_VERSION}"
RUN install-tool node "${GL_COMMON_RENOVATE_NODEJS_VERSION}"
&& install-tool git "${GL_COMMON_RENOVATE_GIT_VERSION}" \
&& install-tool node "${GL_COMMON_RENOVATE_NODEJS_VERSION}" \
 
# TODO: remove once using slim containers
RUN install-tool yarn "${GL_COMMON_RENOVATE_YARN_VERSION}"
RUN install-tool ruby "${GL_COMMON_RENOVATE_RUBY_VERSION}"
RUN install-tool python "${GL_COMMON_RENOVATE_PYTHON_VERSION}"
RUN install-tool jb "${GL_COMMON_RENOVATE_JB_VERSION}"
RUN install-tool golang "${GL_COMMON_RENOVATE_GOLANG_VERSION}"
# TODO: remove once using slim containers
&& install-tool yarn "${GL_COMMON_RENOVATE_YARN_VERSION}" \
&& install-tool ruby "${GL_COMMON_RENOVATE_RUBY_VERSION}" \
&& install-tool python "${GL_COMMON_RENOVATE_PYTHON_VERSION}" \
&& install-tool jb "${GL_COMMON_RENOVATE_JB_VERSION}" \
&& install-tool golang "${GL_COMMON_RENOVATE_GOLANG_VERSION}" \
 
# Install asdf as some renovate scripts will install
# requirements using asdf
ENV ASDF_DIR=/asdf
RUN git clone https://github.com/asdf-vm/asdf.git "${ASDF_DIR}"
# Install asdf as some renovate scripts will install
# requirements using asdf
&& git clone https://github.com/asdf-vm/asdf.git "${ASDF_DIR}" \
 
# Install mise
RUN curl https://mise.jdx.dev/mise-latest-linux-x64 > /bin/mise && chmod 755 /bin/mise
# Install mise
&& curl https://mise.jdx.dev/mise-latest-linux-x64 > /bin/mise && chmod 755 /bin/mise \
 
# Try install renovate with a retry
RUN npm install -g renovate || npm install -g renovate
# Try install renovate with a retry
&& npm install -g renovate || npm install -g renovate \
 
# Cleanup npm
RUN npm cache clean --force
# Cleanup npm
&& npm cache clean --force \
 
# Cleanup apt
RUN apt-get clean autoclean && apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
# Cleanup apt
&& apt-get clean autoclean && apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
 
COPY --from=jsonnet-tool /usr/local/bin/jsonnet-tool /bin/jsonnet-tool
COPY --from=yq /usr/bin/yq /usr/bin/yq
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment