Ответ 1
Используете ли вы Docker для вашей среды сборки?
Я работаю с этим репо: https://github.com/mreferre/yelb
Этот dockercompose ничего не строит (скорее он предназначен для развертывания), но я полагаю, что вы столкнулись с проблемой задолго до этого. Ваш состав должен работать, если вы используете среду выполнения Docker.
Вот как выглядит мой buildspec:
version: 0.2
phases:
build:
commands:
- cd deployments/platformdeployment/Docker
- docker-compose up -d
И это вывод:
[Container] 2019/02/20 13:48:02 Waiting for agent ping
[Container] 2019/02/20 13:48:04 Waiting for DOWNLOAD_SOURCE
[Container] 2019/02/20 13:48:07 Phase is DOWNLOAD_SOURCE
[Container] 2019/02/20 13:48:07 CODEBUILD_SRC_DIR=/codebuild/output/src292484508/src/github.com/mreferre/yelb
[Container] 2019/02/20 13:48:07 YAML location is /codebuild/readonly/buildspec.yml
[Container] 2019/02/20 13:48:07 Processing environment variables
[Container] 2019/02/20 13:48:07 Moving to directory /codebuild/output/src292484508/src/github.com/mreferre/yelb
[Container] 2019/02/20 13:48:07 Registering with agent
[Container] 2019/02/20 13:48:07 Phases found in YAML: 1
[Container] 2019/02/20 13:48:07 BUILD: 2 commands
[Container] 2019/02/20 13:48:07 Phase complete: DOWNLOAD_SOURCE Success: true
[Container] 2019/02/20 13:48:07 Phase context status code: Message:
[Container] 2019/02/20 13:48:07 Entering phase INSTALL
[Container] 2019/02/20 13:48:07 Phase complete: INSTALL Success: true
[Container] 2019/02/20 13:48:07 Phase context status code: Message:
[Container] 2019/02/20 13:48:08 Entering phase PRE_BUILD
[Container] 2019/02/20 13:48:08 Phase complete: PRE_BUILD Success: true
[Container] 2019/02/20 13:48:08 Phase context status code: Message:
[Container] 2019/02/20 13:48:08 Entering phase BUILD
[Container] 2019/02/20 13:48:08 Running command cd deployments/platformdeployment/Docker
[Container] 2019/02/20 13:48:08 Running command docker-compose up -d
Creating network "docker_yelb-network" with driver "bridge"
Pulling redis-server (redis:4.0.2)...
4.0.2: Pulling from library/redis
Pulling yelb-db (mreferre/yelb-db:0.3)...
0.3: Pulling from mreferre/yelb-db
Pulling yelb-appserver (mreferre/yelb-appserver:0.3)...
0.3: Pulling from mreferre/yelb-appserver
Pulling yelb-ui (mreferre/yelb-ui:0.3)...
0.3: Pulling from mreferre/yelb-ui
Creating docker_redis-server_1 ...
Creating docker_yelb-db_1 ...
·[2A·[2K
Creating docker_redis-server_1 ... ·[32mdone·[0m
·[2B·[1A·[2K
Creating docker_yelb-db_1 ... ·[32mdone·[0m
·[1BCreating docker_yelb-appserver_1 ...
·[1A·[2K
Creating docker_yelb-appserver_1 ... ·[32mdone·[0m
·[1BCreating docker_yelb-ui_1 ...
·[1A·[2K
Creating docker_yelb-ui_1 ... ·[32mdone·[0m
·[1B
[Container] 2019/02/20 13:49:00 Phase complete: BUILD Success: true
[Container] 2019/02/20 13:49:00 Phase context status code: Message:
[Container] 2019/02/20 13:49:00 Entering phase POST_BUILD
[Container] 2019/02/20 13:49:00 Phase complete: POST_BUILD Success: true
[Container] 2019/02/20 13:49:00 Phase context status code: Message: