Representer는 Docker 이미지로 배포돼요.
이것들이 어떻게 동작하는지 익히려면 툴링 Docker 일반 정보를 먼저 읽어 보세요.
Representer를 실행해 솔루션 표현을 만들 때는 다음과 같은 Docker 명령을 실행해요:
docker run \
--rm \
--network none \
--mount type=bind,src="${solution_dir}",dst=/solution \
--mount type=bind,src="${output_dir}",dst=/output \
--tmpfs /tmp:rw \
"exercism/${track_slug}-representer" \
"${exercise_slug}" "/solution" "/output"
Docker 이미지에 인자 세 개를 넘긴다는 걸 알 수 있어요:
모든 Representer는 구현에서 다음과 같은 관례를 따라요:
Dockerfile은 저장소의 루트 디렉터리에 있어요./opt/representer여야 해요./opt/representer/bin/run.sh 파일이에요./opt/representer/bin/run.sh 스크립트는 인자 3개를 받아요:
더 자세한 내용은 인터페이스를 참고하세요.
새로 만드는 representer 저장소는 기본적으로 이 관례를 따라요.