docker config create
docker config create
docker config create는 파일이나 STDIN에서 config를 만드는 명령이에요. Swarm 서비스에 전달할 설정 데이터를 등록할 때 사용해요.
출처: 문서
본문
Orchestrator: Swarm
docker config create는 파일 또는 표준 입력에서 새 config를 생성해요. 이름과 데이터 소스를 지정하면 돼요.
지원하는 옵션은 다음과 같아요.
| 옵션 | 기본값 | 설명 |
|---|---|---|
-l, --label |
컨테이너에 메타데이터를 설정해요 | |
--template-driver |
템플릿 드라이버 |
Create a config
표준 입력에서 config를 만들 수 있어요.
$ printf "mysetting" | docker config create my_config -
Create a config with a file
파일에서 config를 만들어요.
$ docker config create my_config ./config.txt
Create a config with labels (-l, --label)
-l / --label로 라벨을 붙여 config를 만들어요.
$ docker config create -l env=production my_config ./config.txt