AWS Beanstalk码头图像自动更新不起作用 [英] AWS Beanstalk docker image automatic update doesn't work

查看:292
本文介绍了AWS Beanstalk码头图像自动更新不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在一个托管在公共存储库中的停泊点映像中打包了一个node.js应用程序。

I have a node.js application packaged in a docker image hosted in a public repository.

我已经在AWS Beanstalk码头应用程序中成功部署了该映像。
问题是,我期待在我更新公共存储库中的图像时自动更新Beanstalk应用程序,如以下配置所示。

I have deployed that image in an AWS Beanstalk docker application successfully. The problem is that I was expecting the Beanstalk application to be automatically updated when I update the image in the public repository, as the following configuration sugggests.

Dockerrun .aws.json:

Dockerrun.aws.json:

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "peveuve/dynamio-payment-service",
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": "8000"
    }
  ],
  "Logging": "/var/log/dynamio"
}

Dockerfile非常简单:

The Dockerfile is very simple:

FROM node:4.2.1-onbuild
# Environment variables
ENV NODE_ENV test
ENV PORT 8000
# expose application port outside
EXPOSE $PORT

亚马逊的文档很清楚:


可选地包括更新密钥。默认值为true,
指示Elastic Beanstalk检查存储库,将图像上的任何更新
,并覆盖任何缓存的映像。

Optionally include the Update key. The default value is "true" and instructs Elastic Beanstalk to check the repository, pull any updates to the image, and overwrite any cached images.

但是,我必须通过上传新版本的Dockerrun.aws.json描述符手动更新Beanstalk应用程序。我错过了什么?是否应该这样工作?

But I have to update the Beanstalk application manually by uploading a new version of the Dockerrun.aws.json descriptor. Did I miss something? Is it supposed to work like that?

推荐答案

文档应该更加清楚。他们所说的是update = true:

The documentation should be more clear. What they are saying is with update=true:

EBS将在 docker pull 之前执行<$当应用程序第一次启动时,c $ c> docker运行

EBS will do a docker pull before it does a docker run when the application is first started. It will not continually poll docker hub.

相比之下,发行一个 docker运行而不先执行 docker pull 将始终使用该机器的本地存储版本,这可能并不总是最新的。

In contrast, issuing a docker run without first doing a docker pull will always use the locally stored version of that machine, which may not always be the latest.

为了达到目的您需要什么,您需要在Docker Hub上设置 webhook ,那调用您控制的应用程序,重建您的ELB应用程序。

In order to acheive what you want, you'll need to set up a webhook on Docker Hub, that calls an application you control, that rebuilds your ELB app.

这篇关于AWS Beanstalk码头图像自动更新不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆