Creation dcoker agents

This commit is contained in:
2025-12-18 13:27:45 +01:00
parent 93c5d78386
commit 2165d3ee84
3 changed files with 21 additions and 0 deletions

8
DockerfileAgent2404 Normal file
View File

@@ -0,0 +1,8 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y openssh-server openjdk-21-jdk
RUN mkdir /var/run/sshd
RUN useradd -m -d /home/jenkins -s /bin/bash jenkins && echo "jenkins:jenkins" | chpasswd
EXPOSE 22
CMD ["/usr/sbin/sshd","-D"]

7
DockerfileAgentAlpine Normal file
View File

@@ -0,0 +1,7 @@
FROM alpine:latest
RUN apk update && apk add --no-cache openssh openjdk21 bash
RUN ssh-keygen -A
RUN adduser -D -h /home/jenkins -s /bin/bash jenkins
RUN echo "jenkins:jenkins" | chpasswd
EXPOSE 22
CMD ["/usr/sbin/sshd","-D"]

6
Vagrantfile vendored
View File

@@ -27,4 +27,10 @@ Vagrant.configure(2) do |config|
end end
end end
config.vm.define "agent2" do |agent2|
agent2.vm.box = "bento/ubuntu-24.04"
agent2.vm.network "private_network", ip: "192.168.11.14"
agent2.vm.hostname = "agent2"
end
end end