簡體   English   中英

在AWS Elastic Beanstalk上運行Docker容器 - 我的Web應用程序在哪里?

[英]Running a Docker container on AWS Elastic Beanstalk - Where is my web app?

  • 我使用Elastic Beanstalk控制台將Docker容器中的應用程序部署到AWS Elastic Beanstalk。
  • 完成在AWS Elastic Beanstalk上部署Web應用程序后 - 環境狀態為綠色。
  • 我單擊環境儀表板上的URL鏈接以查看我的Web應用程序。

它總是導航到網頁有字符串

Congratulations!
Your Docker Container is now running in Elastic Beanstalk on your own dedicated environment in the AWS Cloud

我讀了日志文件,我沒有看到任何錯誤。 這是它的鏈接: http//dockstalker-env.elasticbeanstalk.com/我的網絡應用程序在哪里? 我什么都想念?

Dockerfile

FROM ubuntu:14.04

RUN apt-get update && apt-get upgrade -y

RUN apt-get install -y git git-core wget zip nodejs npm

EXPOSE 8080

# startup
ADD start.sh /tmp/  
RUN chmod +x /tmp/start.sh  
CMD ./tmp/start.sh  

start.sh

cd /tmp

rm -rf docker-node-test; true

git clone https://github.com/incrediblemolk/docker-node-test.git

cd docker-node-test

npm install

nodejs app.js  

Dockerrun.aws.json

{
    "AWSEBDockerrunVersion": "1",
    "Image": {
        "Name": "ubuntu:14.04"
    },
    "Ports": [
        { 
            "ContainerPort": "8080"
        }
    ]
}

在我點擊beanstalk之前,我將3個文件放入.zip文件中。 稱之為aws-test.zip

前往AWS開發人員控制台並選擇“Elastic Beanstalk”。 然后選擇“創建新應用程序”。

  1. 選擇應用程序名稱。
  2. 環境層:Web服務器
  3. 預定義配置:Docker
  4. 環境類型:負載平衡,自動擴展
  5. 在下一個屏幕上,選擇上傳您自己的並找到您創建的zip。
  6. 其他資源。 下一個。
  7. 配置細節。 下一個。
  8. Environtment標簽。 下一個。
  9. 向下滾動並單擊“啟動”。

“祝賀!...”頁面是您在“應用程序版本”步驟中選擇“示例應用程序”選項時通常看到的頁面:

在此輸入圖像描述

請仔細檢查您指定的版本。 此外,查看本教程可能很有用: https//docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deployment.source.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM