Skip to content

Commit

Permalink
[feat] #166 - 사용하지 않는 도커이미지를 서버에서 삭제하도록 Jenkinsfile에 스크립트 추가 (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonyworld authored Aug 9, 2024
1 parent 1c57c10 commit 234e2f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ pipeline {
' -e "SPRING_PROFILES_ACTIVE=' + OPERATION_ENV + '"' +
' ' + DOCKER_IMAGE_NAME + ':latest'
)

// Docker dangling 이미지 정리
sshCommand remote: remote, command: '''
docker images -f "dangling=true" -q | \
xargs -r docker rmi
'''
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spring:

jpa:
hibernate:
ddl-auto: create
ddl-auto: update
show-sql: true
properties:
hibernate:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spring:

jpa:
hibernate:
ddl-auto: create
ddl-auto: none
show-sql: true
properties:
hibernate:
Expand Down

0 comments on commit 234e2f1

Please sign in to comment.