# Docker Base 이미지로 발생한 문제

Docker 의 base 이미지를 관리하는 방법에 대해 생각해봐야 한다.

잘못 관리하면 꽤 심각한 문제를 발생시킬 수 있다.

base image 를 사용하는 전략은 다음의 사항을 고려하며 사용하자

* 장점
  * 이미지의 공통 부분을 일관성 있게 처리할 수 있게 된다.
  * 중요한 공통 처리를 강제 할 수 있다 (보안에 관련된 내용들)
* 단점
  * 버전 관리를 잘 하지 않는다면 변경이 전파된다 (사이드 이펙트)
  * 인프라를 코드로 관리한다는 dockerfile 의 장점이 있는데, 하나의 dockerfile 만으로는 정의되지 않은 처리들이  숨겨진다&#x20;

base 이미지를 복잡하게 만들지 말고 가능한 한 단순하게, 제한적으로 디자인하고

꼭! 버전관리를 하도록 한다. (하위 이미지에서는 반드시 base 이미지의 사용버전을 명시하고 써야한다)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://programmer-jjy.gitbook.io/second-brain/technical/trouble-shooting/docker-base.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
