FROM jenkins/jenkins:2.480 # Install docker USER root RUN apt-get update && apt-get install -y lsb-release RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ https://download.docker.com/linux/debian/gpg RUN echo "deb [arch=$(dpkg --print-architecture) \ 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 apt-get update && apt-get install -y docker-ce-cli ENV DOCKER_HOST=unix:///var/run/docker.sock # Give user `jenkins` permission to use the docker daemon. The group ID of the created `docker` # group matches with the ID of the docker group on the MMKB core server RUN groupadd --gid 1001 docker RUN usermod -aG docker jenkins # Import the CA Certificate needed for company GitLab into the JVM TrustStore to make it known to Jenkins #COPY resources/SectigoRSADomainValidationSecureServerCA.pem /etc/ssl/certs/ #RUN cd $JAVA_HOME/conf/security \ # && keytool -cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ucs-gitlab-cert -file /etc/ssl/certs/SectigoRSADomainValidationSecureServerCA.pem # create maven repository dir and grant permissions to jenkins user so that the directory is # writeable for jenkins jobs RUN mkdir -p /mvn/repository && chown jenkins:jenkins /mvn/repository USER jenkins