2024-06-27 08:40:02 +00:00
|
|
|
FROM jenkins/inbound-agent:latest-bookworm-jdk17
|
2020-01-07 09:32:27 +00:00
|
|
|
|
|
|
|
USER root
|
2023-10-17 10:50:32 +00:00
|
|
|
|
|
|
|
# Update APT
|
2020-01-07 09:32:27 +00:00
|
|
|
RUN apt-get update \
|
2023-10-17 10:50:32 +00:00
|
|
|
&& apt-get upgrade -y
|
|
|
|
|
|
|
|
# Building packages
|
|
|
|
RUN apt-get install -y \
|
2020-01-07 09:32:27 +00:00
|
|
|
sudo \
|
|
|
|
libltdl-dev \
|
|
|
|
libgtk-3-0 \
|
|
|
|
libdbus-glib-1-2 \
|
|
|
|
xvfb \
|
2021-02-17 12:40:05 +00:00
|
|
|
default-mysql-client \
|
|
|
|
build-essential \
|
2023-10-17 10:50:32 +00:00
|
|
|
python-is-python3 \
|
2020-01-07 09:32:27 +00:00
|
|
|
vim \
|
2022-03-18 18:34:13 +00:00
|
|
|
wget \
|
2023-10-17 10:50:32 +00:00
|
|
|
curl
|
|
|
|
|
2024-05-21 19:29:32 +00:00
|
|
|
# Kubernetes client
|
|
|
|
RUN apt-get install -y apt-transport-https ca-certificates curl gnupg \
|
|
|
|
&& curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.26/deb/Release.key \
|
|
|
|
| gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg \
|
|
|
|
&& chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg \
|
|
|
|
&& echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.26/deb/ /' \
|
|
|
|
| tee /etc/apt/sources.list.d/kubernetes.list \
|
|
|
|
&& chmod 644 /etc/apt/sources.list.d/kubernetes.list \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install -y kubectl
|
|
|
|
|
2024-07-03 11:42:22 +00:00
|
|
|
# Docker
|
|
|
|
COPY --from=docker:26.1.3-cli /usr/local/bin/docker /usr/local/bin/
|
|
|
|
|
2023-10-17 10:50:32 +00:00
|
|
|
# Docker compose
|
2024-06-27 08:40:02 +00:00
|
|
|
RUN apt-get install docker-compose -y --no-install-recommends # Debian docker-compose is 1.29.2
|
2020-01-07 09:32:27 +00:00
|
|
|
|
2022-11-14 11:11:02 +00:00
|
|
|
# Puppeteer
|
2023-10-17 10:50:32 +00:00
|
|
|
RUN apt-get install -y --no-install-recommends \
|
2022-11-14 11:11:02 +00:00
|
|
|
gconf-service libasound2 libatk1.0-0 libc6 \
|
|
|
|
libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 \
|
|
|
|
libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 \
|
|
|
|
libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
|
|
|
|
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
|
|
|
|
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
|
2023-10-17 10:50:32 +00:00
|
|
|
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils
|
2022-11-14 11:11:02 +00:00
|
|
|
|
2023-10-17 10:50:32 +00:00
|
|
|
# Firefox
|
2020-01-07 09:32:27 +00:00
|
|
|
RUN cd /opt \
|
|
|
|
&& wget https://ftp.mozilla.org/pub/firefox/releases/64.0.2/linux-x86_64/en-US/firefox-64.0.2.tar.bz2 \
|
|
|
|
&& tar xvjf firefox-64.0.2.tar.bz2 \
|
|
|
|
&& rm firefox-64.0.2.tar.bz2
|
|
|
|
|
2023-10-17 10:50:32 +00:00
|
|
|
# Myt
|
|
|
|
RUN apt-get install -y --no-install-recommends \
|
|
|
|
libkrb5-dev \
|
|
|
|
libssl-dev
|
|
|
|
|
|
|
|
# Clean APT
|
|
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2022-10-14 17:07:10 +00:00
|
|
|
# Fix defunct processeses: https://github.com/jenkinsci/docker-inbound-agent/issues/51
|
|
|
|
ENV TINI_VERSION v0.19.0
|
|
|
|
RUN wget -O /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini \
|
|
|
|
&& chmod 755 /tini
|
|
|
|
|
2023-10-17 10:50:32 +00:00
|
|
|
# User
|
|
|
|
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers \
|
|
|
|
#&& groupadd -g 998 docker \
|
|
|
|
&& usermod -a -G 998 jenkins
|
|
|
|
|
2022-06-20 21:25:22 +00:00
|
|
|
USER jenkins
|
2022-10-14 17:07:10 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/tini", "--", "/usr/local/bin/jenkins-agent"]
|