aws / aws/aws-elastic-beanstalk-cli

NotSupportedError - You can use "eb local" only with preconfigured, generic and multicontainer Docker platforms.

Open
#444 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
181
Forks
88
PR merge metrics
No merged PRs in 30d

Description

### Description

Long story short, im doing my first deployment of multicontainer Docker using `eb` and faced with the issue:
```bash
ERROR Instance deployment: Both 'Dockerfile' and 'Dockerrun.aws.json' are missing in your source bundle. Include at least one of **them.**
```
So I decided to fallow some examples and found that I Can't build/run app locally with `eb`. Im not 100% if its related but decided to add this for context. Let me know if I need to create new issue for Instance deployment issue.

### Steps to reproduce

fallow steps from:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/docker.html
which is:
- create `eb-docker-flask`
- create `Dockerfile` and `application.py` with provided examples
- `eb init -p docker application-name`
- `eb local run --port 5000`

### Observed result

`ebcli.objects.exceptions.NotSupportedError: You can use "eb local" only with preconfigured, generic and multicontainer Docker platforms.`

```bash
eb local run --port 5000 --debug
2023-07-19 10:17:23,171 (DEBUG) cement.core.foundation : laying cement for the 'eb' application
2023-07-19 10:17:23,171 (DEBUG) cement.core.hook : defining hook 'pre_setup'
2023-07-19 10:17:23,171 (DEBUG) cement.core.hook : defining hook 'post_setup'
2023-07-19 10:17:23,171 (DEBUG) cement.core.hook : defining hook 'pre_run'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'post_run'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'pre_argument_parsing'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'post_argument_parsing'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'pre_close'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'post_close'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'signal'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'pre_render'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : defining hook 'post_render'
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : registering hook 'add_handler_override_options' from cement.core.foundation into hooks['post_setup']
2023-07-19 10:17:23,172 (DEBUG) cement.core.hook : registering hook 'handler_override' from cement.core.foundation into hooks['post_argument_parsing']
2023-07-19 10:17:23,172 (DEBUG) cement.core.handler : defining handler type 'extension' (IExtension)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'log' (ILog)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'config' (IConfig)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'mail' (IMail)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'plugin' (IPlugin)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'output' (IOutput)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'argument' (IArgument)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'controller' (IController)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : defining handler type 'cache' (ICache)
2023-07-19 10:17:23,173 (DEBUG) cement.core.handler : registering handler '' into handlers['extension']['cement']
2023-07-19 10:17:23,185 (DEBUG) cement.ext.ext_plugin : plugin config dir C:\etc\eb\plugins.d does not exist.
2023-07-19 10:17:23,185 (DEBUG) cement.ext.ext_plugin : plugin config dir C:\Users\roman\.eb\plugins.d does not exist.
2023-07-19 10:17:23,189 (DEBUG) ebcli.core.hooks : -- EBCLI Version: 3.20.7
2023-07-19 10:17:23,189 (DEBUG) ebcli.core.hooks : -- Python Version: 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
2023-07-19 10:17:23,189 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,190 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,192 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,193 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,194 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,195 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,196 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,197 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,198 (DEBUG) ebcli.lib.utils : docker --version
2023-07-19 10:17:23,252 (DEBUG) ebcli.lib.utils : Docker version 24.0.2, build cb74dfc

2023-07-19 10:17:23,269 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,270 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,271 (DEBUG) ebcli.core.fileoperations : Project root found at: C:\Users\roman\code\java\eb-docker-flask
2023-07-19 10:17:23,272 (DEBUG) ebcli.lib.elasticbeanstalk : Inside list_platform_branches api wrapper
2023-07-19 10:17:23,272 (DEBUG) ebcli.lib.aws : Creating new Botocore Session
2023-07-19 10:17:23,272 (DEBUG) ebcli.lib.aws : Botocore version: 1.29.158
2023-07-19 10:17:23,277 (DEBUG) ebcli.lib.aws : Creating new Botocore Client for elasticbeanstalk
2023-07-19 10:17:23,363 (DEBUG) ebcli.lib.aws : Successfully created session for elasticbeanstalk
2023-07-19 10:17:23,363 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, list_platform_branches) to region: us-west-2 with args:{'Filters': [{'Attribute': 'BranchName', 'Operator': '=', 'Values': ['Docker']}]}
2023-07-19 10:17:23,691 (DEBUG) ebcli.lib.aws : API call finished, status = 200
2023-07-19 10:17:23,691 (DEBUG) ebcli.lib.aws : Response: {'PlatformBranchSummaryList': [], 'ResponseMetadata': {'RequestId': '5bd896f5-25df-4be0-b544-8d8c83f57e09', 'HTTPStatusCode': 200, 'date': 'Wed, 19 Jul 2023 14:17:23 GMT', 'RetryAttempts': 0}}
2023-07-19 10:17:23,691 (DEBUG) ebcli.lib.elasticbeanstalk : Inside get_available_solution_stacks api wrapper
2023-07-19 10:17:23,691 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, list_available_solution_stacks) to region: us-west-2 with args:{}
2023-07-19 10:17:23,973 (DEBUG) ebcli.lib.aws : API call finished, status = 200
2023-07-19 10:17:23,973 (DEBUG) ebcli.lib.aws : Response: {'SolutionStacks': ['64bit Amazon Linux 2018.03 v2.9.11 running PHP 5.4', '64bit Amazon Linux 2018.03 v2.9.11 running PHP 5.5', '64bit Amazon Linux 2018.03 v2.9.11 running PHP 5.6', '64bit Amazon Linux 2018.03 v2.9.11 running PHP 7.0', '64bit Amazon Linux 2018.03 v2.9.11 running PHP 7.1', '64bit Amazon Linux 2018.03 v2.9.15 running Python 3.4', '64bit Amazon Linux 2018.03 v2.9.15 running Python', '64bit Amazon Linux 2018.03 v2.9.15 running Python 2.7', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.3 (Passenger Standalone)', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.2 (Passenger Standalone)', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.1 (Passenger Standalone)', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.0 (Passenger Standalone)', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 1.9.3', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.3 (Puma)', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.2 (Puma)', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.1 (Puma)', '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.0 (Puma)', '64bit Amazon Linux 2018.03 v3.4.0 running Tomcat 8 Java 8', '64bit Amazon Linux 2018.03 v3.4.0 running Tomcat 7 Java 6', '64bit Windows Server Core 2019 v2.11.6 running IIS 10.0', '64bit Windows Server 2019 v2.11.6 running IIS 10.0', '64bit Windows Server Core 2016 v2.11.6 running IIS 10.0', '64bit Windows Server 2016 v2.11.6 running IIS 10.0', '64bit Windows Server Core 2012 R2 v2.11.6 running IIS 8.5', '64bit Windows Server 2012 R2 v2.11.6 running IIS 8.5', '64bit Debian jessie v2.16.0 running Go 1.4 (Preconfigured - Docker)', '64bit Debian jessie v2.16.0 running Go 1.3 (Preconfigured - Docker)', '64bit Debian jessie v2.16.0 running Python 3.4 (Preconfigured - Docker)', '64bit Amazon Linux 2023 v5.0.0 running Tomcat 10 Corretto 17', '64bit Amazon Linux 2023 v4.0.2 running Python 3.11', '64bit Amazon Linux 2023 v4.0.2 running Python 3.9', '64bit Amazon Linux 2 v3.6.9 running Ruby 3.0', '64bit Amazon Linux 2 v3.6.9 running Ruby 2.7', '64bit Amazon Linux 2 v3.2.9 running ECS', '64bit Amazon Linux 2 v4.3.9 running Tomcat 8.5 Corretto 11', '64bit Amazon Linux 2 v4.3.9 running Tomcat 8.5 Corretto 8', '64bit Amazon Linux 2 v3.7.4 running Go 1', '64bit Amazon Linux 2 v3.4.9 running Corretto 17', '64bit Amazon Linux 2 v3.4.9 running Corretto 11', '64bit Amazon Linux 2 v3.4.9 running Corretto 8', '64bit Amazon Linux 2 v5.8.3 running Node.js 18', '64bit Amazon Linux 2 v5.8.3 running Node.js 16', '64bit Amazon Linux 2 v5.8.3 running Node.js 14', '64bit Amazon Linux 2 v3.5.9 running PHP 8.1', '64bit Amazon Linux 2 v3.5.9 running PHP 8.0', '64bit Amazon Linux 2 v2.5.5 running .NET Core', '64bit Amazon Linux 2 v3.5.4 running Python 3.8', '64bit Amazon Linux 2 v3.5.4 running Python 3.7', '64bit Amazon Linux 2 v3.5.9 running Docker', '64bit Amazon Linux 2018.03 v2.6.33 running Packer 1.0.3'], 'SolutionStackDetails': [{'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.11 running PHP 5.4', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.11 running PHP 5.5', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.11 running PHP 5.6', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.11 running PHP 7.0', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.11 running PHP 7.1', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.15 running Python 3.4', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.15 running Python', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.9.15 running Python 2.7', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.3 (Passenger Standalone)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.2 (Passenger Standalone)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.1 (Passenger Standalone)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.0 (Passenger Standalone)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 1.9.3', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.3 (Puma)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.2 (Puma)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.1 (Puma)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.12.0 running Ruby 2.0 (Puma)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v3.4.0 running Tomcat 8 Java 8', 'PermittedFileTypes': ['war', 'zip']}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v3.4.0 running Tomcat 7 Java 6', 'PermittedFileTypes': ['war', 'zip']}, {'SolutionStackName': '64bit Windows Server Core 2019 v2.11.6 running IIS 10.0', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Windows Server 2019 v2.11.6 running IIS 10.0', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Windows Server Core 2016 v2.11.6 running IIS 10.0', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Windows Server 2016 v2.11.6 running IIS 10.0', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Windows Server Core 2012 R2 v2.11.6 running IIS 8.5', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Windows Server 2012 R2 v2.11.6 running IIS 8.5', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Debian jessie v2.16.0 running Go 1.4 (Preconfigured - Docker)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Debian jessie v2.16.0 running Go 1.3 (Preconfigured - Docker)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Debian jessie v2.16.0 running Python 3.4 (Preconfigured - Docker)', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2023 v5.0.0 running Tomcat 10 Corretto 17', 'PermittedFileTypes': ['war', 'zip']}, {'SolutionStackName': '64bit Amazon Linux 2023 v4.0.2 running Python 3.11', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2023 v4.0.2 running Python 3.9', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.6.9 running Ruby 3.0', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.6.9 running Ruby 2.7', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.2.9 running ECS', 'PermittedFileTypes': []}, {'SolutionStackName': '64bit Amazon Linux 2 v4.3.9 running Tomcat 8.5 Corretto 11', 'PermittedFileTypes': ['war', 'zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v4.3.9 running Tomcat 8.5 Corretto 8', 'PermittedFileTypes': ['war', 'zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.7.4 running Go 1', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.4.9 running Corretto 17', 'PermittedFileTypes': ['jar', 'zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.4.9 running Corretto 11', 'PermittedFileTypes': ['jar', 'zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.4.9 running Corretto 8', 'PermittedFileTypes': ['jar', 'zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v5.8.3 running Node.js 18', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v5.8.3 running Node.js 16', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v5.8.3 running Node.js 14', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.5.9 running PHP 8.1', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.5.9 running PHP 8.0', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v2.5.5 running .NET Core', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.5.4 running Python 3.8', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.5.4 running Python 3.7', 'PermittedFileTypes': ['zip']}, {'SolutionStackName': '64bit Amazon Linux 2 v3.5.9 running Docker', 'PermittedFileTypes': []}, {'SolutionStackName': '64bit Amazon Linux 2018.03 v2.6.33 running Packer 1.0.3', 'PermittedFileTypes': []}], 'ResponseMetadata': {'RequestId': '94ae89f1-c8c9-468a-9c58-bb8096358527', 'HTTPStatusCode': 200, 'date': 'Wed, 19 Jul 2023 14:17:23 GMT', 'RetryAttempts': 0}}
2023-07-19 10:17:23,974 (DEBUG) ebcli.lib.elasticbeanstalk : Solution Stack result size = 50
2023-07-19 10:17:23,979 (INFO) eb : Traceback (most recent call last):
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\ebcli\core\ebrun.py", line 62, in run_app
app.run()
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\cement\core\foundation.py", line 797, in run
return_val = self.controller._dispatch()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\cement\core\controller.py", line 472, in _dispatch
return func()
^^^^^^
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\cement\core\controller.py", line 472, in _dispatch
return func()
^^^^^^
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\cement\core\controller.py", line 478, in _dispatch
return func()
^^^^^^
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\ebcli\core\abstractcontroller.py", line 92, in default
self.do_command()
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\ebcli\controllers\local.py", line 62, in do_command
cnt = factory.make_container(self.app.pargs.envvars,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\roman\AppData\Local\Programs\Python\Python311\Lib\site-packages\ebcli\containers\factory.py", line 76, in make_container
raise NotSupportedError(strings['local.unsupported'])
ebcli.objects.exceptions.NotSupportedError: You can use "eb local" only with preconfigured, generic and multicontainer Docker platforms.
```

### Expected result

Build and run of the docker file

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

1. OS: windows 11
2. EBCLI version: EB CLI 3.20.7 (Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)])

Contributor guide

Open the contributing guide

Research direction

Begin with the documented Docker workflow and the `eb local run --port 5000 --debug` entry point. No repository file or test is named; completion should address the observed NotSupportedError for the described Docker setup and verify the result.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker, python
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.