Creation dcoker agents
This commit is contained in:
8
DockerfileAgent2404
Normal file
8
DockerfileAgent2404
Normal 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
7
DockerfileAgentAlpine
Normal 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
6
Vagrantfile
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user