-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 763 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 763 Bytes
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
FROM jenkins/inbound-agent:alpine-jdk21 as jnlp
FROM jenkins/agent:latest-jdk21
ARG version
LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="$version"
ARG user=jenkins
USER root
COPY --from=jnlp /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-agent
RUN chmod +x /usr/local/bin/jenkins-agent &&\
ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave
RUN apt-get update \
&& apt-get -y install \
unzip \
curl \
rsync \
openssh-client \
ca-certificates \
curl \
apt-transport-https \
lsb-release \
gnupg
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
USER ${user}
ENTRYPOINT ["/usr/local/bin/jenkins-agent"]