This commit is contained in:
Ionel Andrei Cataon
2026-02-19 19:19:14 +02:00
parent f0b4466a76
commit 546fc277a4
2 changed files with 11 additions and 12 deletions

View File

@@ -4,14 +4,14 @@ services:
build: build:
context: . context: .
dockerfile: dockerfile.jenkins dockerfile: dockerfile.jenkins
environment:
TZ: "Europe/Bucharest"
ports: ports:
- "60199:8080" - "60199:8080"
- "5000:5000" - "5000:5000"
volumes: volumes:
- "jenkins:/var/jenkins_home" - "jenkins:/var/jenkins_home"
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
group_add:
- "999"
restart: unless-stopped restart: unless-stopped
volumes: volumes:

View File

@@ -1,14 +1,13 @@
FROM jenkins/jenkins:latest FROM jenkins/jenkins:lts
USER root USER root
# Instalăm clientul de Docker în interiorul imaginii Jenkins RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y lsb-release
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ RUN curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-27.5.1.tgz | tar xvz && \
https://download.docker.com/linux/debian/gpg mv docker/docker /usr/bin/docker && \
RUN echo "deb [arch=$(dpkg --print-architecture) \ rm -rf docker
signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \
https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list RUN groupadd -g 999 docker || true && \
RUN apt-get update && apt-get install -y docker-ce-cli usermod -aG docker jenkins
USER jenkins USER jenkins