Docker implementation does not support named stages
See original GitHub issueDescription
My Multi-Stage Dockerfile does not build when I label my build stages
Steps to reproduce
- Create a Docker environment with a multi stage build that uses a FROM statement, such as:
FROM node:8 as assets
Observed result
Please provide command output with --debug
flag set.
From eb-engine.log: 2020/11/17 00:32:25.164489 [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:8 as assets failed with error exit status 1. Stderr:“docker pull” requires exactly 1 argument.
Expected result
Multi-stage Dockerfile builds allow for named stages, as an example in my Dockerfile:
FROM node:8 as assets
ENV PATH=/app/node_modules/.bin:$PATH
WORKDIR /app/app/static/js/
COPY /app/static/js/package.json .
COPY /app/static/scss/custom.scss ../scss/
RUN npm install
RUN npm install -g sass
RUN sass /app/app/static/scss/custom.scss /app/app/static/css/style.css --style compressed
...
COPY --from=assets /app/app/static/ /app/app/static/
This issue was reported also on a Stack Overflow Issue.
Our platforms supports Docker 19.03.6-ce, according to our docs (which itself was released earlier in 2020 according to the release notes here, and this functionality has existed since at least 2019, looking at the GitHub PR here
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Amazon Linux 2 / macOS 10.15
- EBCLI version: EB CLI 3.19.1 (Python 3.9.0)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top GitHub Comments
We are having our platform team look into this and will get back to you when we have an appropriate resolution. In the meantime, if you remove the named stage, does this work as expected? Also, could you kindly let us know what Beanstalk platform you are using? Thanks.
thanks for your patience. Currently Elastic Beanstalk does not support multi-stage docker build. We do have plans to support this. I have created a new issue in elastic-beanstalk-roadmap and the elastic beanstalk platform team will pick it up from there. let me know if you have any questions. thanks!