Compare commits
2 Commits
b2d81e5f34
...
cba6c6c8a0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cba6c6c8a0 | ||
|
|
4a87a616ae |
@ -1,11 +1,18 @@
|
||||
|
||||
services:
|
||||
jenkins:
|
||||
image: jenkins/jenkins:lts
|
||||
image: nexus.rschneider.hu/repo1/infra/jenkins:1.0.1
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "4112:8080"
|
||||
volumes:
|
||||
- jenkins_home:/var/jenkins_home
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- mvn_repository:/mvn/repository
|
||||
ssh-agent:
|
||||
image: jenkins/ssh-agent
|
||||
|
||||
|
||||
volumes:
|
||||
jenkins_home:
|
||||
mvn_repository:
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
FROM jenkins:2.60.3
|
||||
|
||||
# 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 999 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
|
||||
9
jenkins/docker/script/docker.build.sh
Normal file
9
jenkins/docker/script/docker.build.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
CURRENT_DIR=$(dirname "$0")
|
||||
DOCKER_CONTEXT_DIR=$(readlink -f "$CURRENT_DIR/..");
|
||||
|
||||
tag="nexus.rschneider.hu/repo1/infra/jenkins:1.0.1"
|
||||
|
||||
docker build --tag $tag . \
|
||||
&& docker push $tag
|
||||
Loading…
Reference in New Issue
Block a user