Docker Config
Swarm 서비스에 전달할 비민감 설정 파일 객체를 관리하는 docker config 그룹.
Summary
- secret과 비슷하지만 민감 정보가 아닌 설정 데이터를 배포할 때 쓴다.
- service mount 시 파일 형태로 제공된다.
- 대용량 설정 파일을 이미지에 bake하지 않고 배포 단에서 바꾸고 싶을 때 유용하다.
Usage
docker config COMMAND
Command Groups
create: 파일 또는 stdin에서 config 생성- 주요 옵션:
–label,–template-driver
ls: config 목록- 주요 옵션:
–filter,–format,-q
inspect: metadata 확인- 주요 옵션:
-f,–pretty
rm: config 삭제
Examples
# 파일에서 config 생성 docker config create nginx_conf ./nginx.conf # 목록 확인 docker config ls
Troubleshooting
- 이미 참조 중인 config는 바로 삭제되지 않을 수 있다.
- 민감한 내용이면 이 그룹보다 secret 이 맞다.
Help
Usage: docker config COMMAND Manage Swarm configs Commands: create Create a config from a file or STDIN inspect Display detailed information on one or more configs ls List configs rm Remove one or more configs Run 'docker config COMMAND --help' for more information on a command.
+
See Also
History
- codex:: 2026-07-06 Added docker config subpage with file/stdin config object notes.