Docker 컨테이너에서 실행
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
제공된 Dockerfile 및 docker-compose.yml을 사용하여 빌드된 Docker 컨테이너 내에서 예제를 실행하고 Google Ads API 애플리케이션을 개발할 수도 있습니다.
Docker 환경이 설치되어 있는 경우 이 작업을 실행하려면 이 저장소를 클론한 디렉터리에서 다음 명령어를 실행합니다.
docker-compose up --build -d
이렇게 하면 실행 환경이 설정된 Docker 컨테이너 인스턴스가 제공됩니다.
Docker 컨테이너 내에서 Bash 셸을 열려면 docker ps
를 실행하여 컨테이너 ID를 가져온 후 다음을 실행합니다.
docker exec -it <YOUR_CONTAINER_ID> bash
이렇게 하면 컨테이너 내에서 코드 예시와 기타 애플리케이션을 실행할 수 있습니다.
단축형으로, 머신에서 실행되는 Docker 컨테이너가 하나만 있는 경우 다음을 실행할 수도 있습니다.
docker exec -it $(docker ps -a -q) bash
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[null,null,["최종 업데이트: 2025-08-27(UTC)"],[[["\u003cp\u003eUtilize provided Docker resources to execute Google Ads API application examples and develop your own applications within a Docker container.\u003c/p\u003e\n"],["\u003cp\u003eInitiate the Docker environment by executing \u003ccode\u003edocker-compose up --build -d\u003c/code\u003e after cloning the repository.\u003c/p\u003e\n"],["\u003cp\u003eAccess a Bash shell inside the container using \u003ccode\u003edocker exec -it <YOUR_CONTAINER_ID> bash\u003c/code\u003e to interact with code samples and applications.\u003c/p\u003e\n"],["\u003cp\u003eIf running a single Docker container, \u003ccode\u003edocker exec -it $(docker ps -a -q) bash\u003c/code\u003e can be used as a shortcut for shell access.\u003c/p\u003e\n"]]],[],null,["# Running in a Docker Container\n\nYou can also execute the examples and develop your Google Ads API application\ninside a Docker container, built using the provided\n[Dockerfile](https://github.com/googleads/google-ads-perl/blob/HEAD/Dockerfile) and\n[docker-compose.yml](https://github.com/googleads/google-ads-perl/blob/HEAD/docker-compose.yml).\n\nTo do so (provided that you have a Docker environment\n[installed](//docs.docker.com/install/)), run the following command in the\ndirectory where you cloned this repository: \n\n docker-compose up --build -d\n\nThis will provide a Docker container instance with the execution environment set\nup.\n\nTo open a Bash shell inside the Docker container, run `docker ps` to get\nthe container ID, then run: \n\n docker exec -it \u003cYOUR_CONTAINER_ID\u003e bash\n\nThis will allow you to run code examples and other applications inside the\ncontainer.\n\nAs a shorthand, in case you only have a single Docker container running on your\nmachine, you can also run: \n\n docker exec -it $(docker ps -a -q) bash"]]