2016-09-21 209 views
1

有沒有人在將docker應用部署到aws eb時遇到部署失敗?AWS Elastic Beanstalk Docker部署失敗

這裏是一片日誌

time="2016-09-20T09:36:42.802106539Z" level=error msg="Handler for DELETE /v1.23/containers/c7bc72d9ccec returned error: You cannot remove a running container c7bc72d9ccec6557ddca8e90c7c77b350cb0c80be9a90921478adccd70a2b97a. Stop the container before attempting removal or use -f" time="2016-09-20T09:36:42.924322201Z" level=error msg="Handler for DELETE /v1.23/images/9daab71ad3c0 returned error: conflict: unable to delete 9daab71ad3c0 (cannot be forced) - image is being used by running container c7bc72d9ccec" time="2016-09-20T09:36:42.924865908Z" level=error msg="Handler for DELETE /v1.23/images/dbcc41959b55 returned error: conflict: unable to delete dbcc41959b55 (cannot be forced) - image has dependent child images"

對於環境部署的第一時間,效果很好。但是,每次我部署新版本的應用程序時,都會失敗。

在64位Amazon Linux上運行2016.03 v2.1.6 |泊塢窗1.11.2

我Dockerfile是相當簡單:

# Get Node Latest 
FROM node:6.5.0 

# Create working directory 
WORKDIR /app 
ADD . /app 

# Install depencencies 
RUN npm install 

# Expost 3000 port 
EXPOSE 3000 

# Start app 
CMD ["node", "server.js"] 

回答

0

事實證明,npm install可能需要很長時間運行的辯論,因爲一旦我把node_modules到壓縮和刪除Dockerfile npm install,它需要3現在部署-5分鐘。

+0

真的是這樣嗎?或者你在編譯期間有npm install的問題... – smentek

+0

我不確定,但上次我檢查它是成功地通過紗線安裝完成的。也許是超時? –

+0

只需檢查您的日誌:eb ssh,less/var/log/eb-activity,less/var/log/docker,less /var/log/eb-docker/containers/eb-current-app/***.log ,登錄到容器:sudo docker ps,sudo docker exec -it bash – smentek