我正在努力将我的构建部署到Docker上的AWS上。我不知道解决方案在哪里,因为这是我第一次使用Docker。我已经在本地一切正常,但是当我部署时,在Elastic Beanstalk中出现以下错误:
2020/04/30 05:35:02.330900 [ERROR] An error occurred during execution of command [app-deploy] - [Docker Specific Build Application]. Stop running the command. Error: failed to pull docker image: Command /bin/sh -c docker pull node:13.3.0 AS compile-image failed with error exit status 1. Stderr:"docker pull" requires exactly 1 argument. See 'docker pull --help'.
这是我的Docker文件的样子:
FROM node:13-alpine as builder WORKDIR /opt/ng COPY package.json package-lock.json ./ RUN npm install ENV PATH="./node_modules/.bin:$PATH" COPY . ./ RUN ng build --prod FROM nginx:1.18-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=builder /opt/ng/dist/angular-universal-app/browser /usr/share/nginx/html
有人可以指出正确的方向吗?还是Elastic Beanstalk的Docker版本不支持这种多阶段构建方法?
使用使用“ Amazon Linux 2”的解决方案堆栈时,我已经看到此错误。这些平台是新的,并且存在一些持续存在的问题。
Beta版将对Amazon Elastic Linux 2 AWS Elastic Beanstalk提供支持,并且可能会发生变化。
请使用名称为“ Amazon Linux”的解决方案堆栈。您不应在那里遇到问题。