diff --git a/Dockerfile b/Dockerfile index 2dbfce412..6b8b51f42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use an official OpenJDK runtime as a parent image -FROM openjdk +FROM openjdk:11-jdk # Set the working directory inside the container WORKDIR /app @@ -11,8 +11,9 @@ COPY mvnw pom.xml ./ # Copy the project source code COPY src ./src +RUN chmod +x ./mvnw # Package the application -RUN ./mvnw clean package -DskipTests +RUN ./mvnw clean package -DskipTests -X # Copy the JAR file to the app directory COPY target/*.jar app.jar diff --git a/Jenkinsfile b/Jenkinsfile index bd0ff8d89..8ac23c6f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,8 +29,6 @@ pipeline { } } - // Further stages would reference env.DOCKER_IMAGE_ID if needed - } post { diff --git a/docker-compose_spring-petclinic.yml b/docker-compose_spring-petclinic.yml index 9774a1719..7c0f0e81e 100644 --- a/docker-compose_spring-petclinic.yml +++ b/docker-compose_spring-petclinic.yml @@ -36,7 +36,7 @@ services: - prometheus jenkins: - image: jenkins/jenkins:lts + image: my-jenkins:latest ports: - "8081:8080" - "50000:50000" @@ -48,6 +48,7 @@ services: volumes: - jenkins_data:/var/jenkins_home - ./jenkins.yaml:/var/jenkins_home/casc_configs/jenkins.yaml + - /var/run/docker.sock:/var/run/docker.sock networks: - custom-network