Skip to content

Commit 1b19a87

Browse files
jxblummp911de
authored andcommitted
Enable Jenkins CI build to fork Docker Containers (due to the use of Testcontainers) inside Docker.
See #1170.
1 parent 42a0011 commit 1b19a87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Jenkinsfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pipeline {
5151
steps {
5252
script {
5353
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
54-
docker.image('springci/spring-data-openjdk17-cassandra-3.11:latest').inside('-v $HOME:/tmp/jenkins-home') {
54+
docker.image('springci/spring-data-openjdk17-cassandra-3.11:latest').inside('-u root -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home') {
5555
sh 'mkdir -p /tmp/jenkins-home'
5656
sh 'JAVA_HOME=/opt/java/openjdk /opt/cassandra/bin/cassandra -R &'
5757
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,external-cassandra clean dependency:list verify -Dsort -U -B'
@@ -81,7 +81,7 @@ pipeline {
8181
steps {
8282
script {
8383
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
84-
docker.image('adoptopenjdk/openjdk17:latest').inside('-v $HOME:/tmp/jenkins-home') {
84+
docker.image('adoptopenjdk/openjdk17:latest').inside('-u root -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home') {
8585
sh 'mkdir -p /tmp/jenkins-home'
8686
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory ' +
8787
'-Dartifactory.server=https://repo.spring.io ' +
@@ -113,7 +113,7 @@ pipeline {
113113
steps {
114114
script {
115115
docker.withRegistry('', 'hub.docker.com-springbuildmaster') {
116-
docker.image('adoptopenjdk/openjdk17:latest').inside('-v $HOME:/tmp/jenkins-home') {
116+
docker.image('adoptopenjdk/openjdk17:latest').inside('-u root -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v $HOME:/tmp/jenkins-home') {
117117
sh 'mkdir -p /tmp/jenkins-home'
118118
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,distribute ' +
119119
'-Dartifactory.server=https://repo.spring.io ' +

0 commit comments

Comments
 (0)