Giter VIP home page Giter VIP logo

localstack-docker-extension's Introduction

LocalStack Docker Extension

The LocalStack Extension for Docker Desktop enables developers working with LocalStack to run their AWS applications or Lambdas entirely on their local machine without connecting to a remote cloud provider!

LocalStack empowers developers to use over 75+ AWS services locally while helping them simplify their testing and development workflow. LocalStack supports a comprehensive list of APIs, which you can view on our Feature coverage page.

Snap of LocalStack running on Docker Desktop as a Docker Extension

Installation

You can install the LocalStack Extension for Docker Desktop via pulling our public Docker image from Docker Hub:

docker extension install localstack/localstack-docker-desktop:0.5.1

To setup the Docker Extension by building the image locally, you can run the following commands:

make install-extension

It will build the Docker image and install the extension on your Docker Desktop application. After the installation, you will be prompted to select where LocalStack will be mounted. Open the drop-down and choose the username. You can additionally change this setting by navigating to the Configurations tab and selecting the mount point.

Features

Currently, the LocalStack Extension for Docker Desktop supports the following features:

  • Control LocalStack: Start, stop, and restart LocalStack from the Docker Desktop. You can also see the current status of your LocalStack instance and navigate to LocalStack Web Application.
  • LocalStack insights: You can see the log information of the LocalStack instance and all the available services and their status on the service page.
  • LocalStack configurations: You can manage and use your profiles via configurations and create new configurations for your LocalStack instance.

Contributing

To contribute, check out our issue tracker. To set up LocalStack Docker Extension for development, you can follow the steps below:

  1. Clone the repository and install all the dependencies using npm:

    $ git clone https://github.com/localstack/localstack-docker-extension/
    $ cd ui
    $ npm install
  2. Open the Developer Tools or create new features:

    $ make debug
  3. Start the Extension on Docker Desktop and enable hot-reload using the following command:

    $ make hot-reloading
  4. Disable hot reloading:

    $ make stop-hot-reloading

Releases

Please refer to CHANGELOG to see the complete list of changes for each release.

License

This software is released under the Apache License, Version 2.0 (see LICENSE).

localstack-docker-extension's People

Contributors

dependabot[bot] avatar harshcasper avatar lucbpz avatar lukqw avatar pive01 avatar whummer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

localstack-docker-extension's Issues

Improvement on docs and profile creation in docker extension

Summary

Story time:
As a developer new to using LocalStack through docker extension,
I want to configure LocalStack properly to ensure it runs with the desired configuration,
So that I can test and develop with ease.

Requirements

  1. When creating a new Configuration Profile, provide a default list of common Environment Variables to choose from, same as offered in docker-compose.yml.
    For each Environment Variable, the setup interface provides a brief description and usage context to assist users.
    Afterward, provide an option to supply custom Environment Variables as well.
  2. The user should be unable to save a configuration profile without specifying a name or specifying at least one variable.
    The system should prompt the user to enter a name before proceeding.
  3. After creating a new configuration profile, the system automatically switches to that profile without requiring manual selection.
    The user interface provides visual feedback, such as highlighting or indicating the selected configuration profile.
  4. Create a clear documentation on how to configure the LocalStack/LocalStack-Pro configuration profile.

Expected Behaviour

Developers can configure LocalStack seamlessly, leading to efficient testing and development workflows without the need for extensive trial and error.

LInks

Reported by user.

[bug] Localstack docker image started but not visible in docker

Using this version: pive01/localstack-docker-extension:0.3.2

Used config:
LOCALSTACK_API_KEY=XXX, DEBUG=1, LOCALSTACK_VOLUME_DIR=/C/temp/localstack

When hitting the start button, I received all the INFO, DEBUG messages as toast notifications:
image
image

I can see that the docker image is started:
image

Running localstack status to get info if localstack is started:

localstack status                                                                                                                            

┌─────────────────┬───────────────────────────────────────────────────────┐
│ Runtime version │ 1.4.1.dev                                             │
│ Docker image    │ tag: latest, id: 48775529339f, 📆 2023-02-23T12:47:41 │
│ Runtime status  │ ✖ stopped                                             │
└─────────────────┴───────────────────────────────────────────────────────┘

Testing out if it works anyway.

awslocal docdb create-db-cluster --db-cluster-identifier fb231 --engine docdb  
{
    "DBCluster": {
        "DBClusterIdentifier": "fb231",
        "DBClusterParameterGroup": "default.docdb",
        "Status": "available",
        "Endpoint": "localhost:38397",
        "MultiAZ": false,
        "Engine": "docdb",
        "Port": 38397,
        "MasterUsername": "test",
        "DBClusterMembers": [],
        "StorageEncrypted": false,
        "DBClusterArn": "arn:aws:rds:us-east-1:000000000000:cluster:fb231"
    }
}

If I check Docker Desktop Containers page if the container is running it's not mentioned there. Only the docdb image is visible.

image

Logs:


LocalStack version: 1.4.1.dev
LocalStack Docker container id: 1a1f007cd964
LocalStack build date: 2023-02-23
LocalStack build git hash: 4be57540

Starting DNS servers (tcp/udp port 53 on 0.0.0.0)...
Ready.

2023-02-24T12:33:29.996  INFO --- [  MainThread] l.extensions.platform      : loaded 0 extensions
2023-02-24T12:33:30.003  INFO --- [  MainThread] botocore.credentials       : Found credentials in environment variables.
2023-02-24T12:33:30.042  WARN --- [-functhread5] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.042  WARN --- [-functhread5] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.049  INFO --- [-functhread5] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2023-02-24T12:33:30.049  INFO --- [-functhread5] hypercorn.error            : Running on https://0.0.0.0:4566 (CTRL + C to quit)
2023-02-24T12:33:30.070  WARN --- [-functhread6] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.070  WARN --- [-functhread6] hypercorn.error            : ASGI Framework Lifespan error, continuing without Lifespan support
2023-02-24T12:33:30.070  INFO --- [-functhread6] hypercorn.error            : Running on https://0.0.0.0:443 (CTRL + C to quit)
2023-02-24T12:33:30.070  INFO --- [-functhread6] hypercorn.error            : Running on https://0.0.0.0:443 (CTRL + C to quit)
2023-02-24T12:35:27.076  INFO --- [   asgi_gw_0] botocore.credentials       : Found credentials in environment variables.
2023-02-24T12:35:27.278  INFO --- [functhread27] l.services.docdb.docdb_api : Starting Document DB instance on port 38397
2023-02-24T12:35:29.718  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS rds.CreateDBCluster => 200

Add system requirements on startup screen

Summary

Add a place where to specify system requirements

Requirements

We should add a screen where to specify that "Show extensions system containers" must be switched on since the description is not so visible

Expected Behaviour

Once I start the extensions for the first time, somewhere there must be a text that says to have "Show extensions system containers" enabled or find a way to make this happen by default (if possible)

References

https://localstack-community.slack.com/archives/CMAFN2KSP/p1679737659773959

Add ability to customize image tag for LS container

Summary

Currently we're hardcoding the version 2.1.0 for the Docker image used to spin up the container.

export const IMAGE = 'localstack/localstack:2.1.0';

Would be great if there was an easy way to configure that, or at least not hardcode 2.1.0 and use latest instead.

It is actually possible to customize the image name/version via IMAGE_NAME:

image

Perhaps we could simply use the latest tag for now, as a quick workaround?

/cc @Pive01 @HarshCasper

Update images pulls non-existing and deprecated images

Describe the bug

Similar to the LocalStack CLI localstack/localstack#8178, the "Update images" functionality pulls non-existing and deprecated images.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Click on '..."
  2. Click on 'Update images'
  3. Click on 'Update'
Click to toggle full list of images
Updating docker images


✅ Image localstack/localstack-pro:latest up-to-date.


❌ Image public.ecr.aws/lambda/nodejs:18-rapid-x86_64 pull failed: Error during the communication with the docker daemon


✅ Image localstack/localstack:latest up-to-date.


❌ Image public.ecr.aws/lambda/python:3.9-rapid-x86_64 pull failed: Error during the communication with the docker daemon


✅ Image mlupin/docker-lambda:python3.9 up-to-date.


✅ Image mlupin/docker-lambda:nodejs16.x up-to-date.


✅ Image mlupin/docker-lambda:nodejs14.x up-to-date.


✅ Image public.ecr.aws/lambda/go:1 up-to-date.


✅ Image public.ecr.aws/lambda/java:8.al2 up-to-date.


✅ Image public.ecr.aws/lambda/python:3.8 up-to-date.


✅ Image public.ecr.aws/lambda/dotnet:core3.1 up-to-date.


✅ Image public.ecr.aws/lambda/java:8 up-to-date.


✅ Image public.ecr.aws/lambda/dotnet:6 up-to-date.


✅ Image public.ecr.aws/lambda/java:11 up-to-date.


✅ Image public.ecr.aws/lambda/python:3.9-x86_64 up-to-date.


✅ Image public.ecr.aws/lambda/python:3.9 up-to-date.


✅ Image public.ecr.aws/lambda/python:3.7 up-to-date.


✅ Image public.ecr.aws/lambda/ruby:2.7 up-to-date.


✅ Image public.ecr.aws/lambda/provided:alami up-to-date.


✅ Image public.ecr.aws/lambda/nodejs:18-x86_64 up-to-date.


✅ Image public.ecr.aws/lambda/nodejs:18 up-to-date.


✅ Image public.ecr.aws/lambda/nodejs:14 up-to-date.


✅ Image public.ecr.aws/lambda/nodejs:16 up-to-date.


✅ Image public.ecr.aws/lambda/nodejs:12 up-to-date.


✅ Image public.ecr.aws/lambda/provided:al2 up-to-date.


✅ Image localstack/localstack-pro:2.0 up-to-date.


✅ Image localstack/localstack-pro:2.0.1 up-to-date.


✅ Image localstack/localstack-docker-desktop:0.4.0 up-to-date.


✅ Image localstack/localstack-pro:1.4.0 up-to-date.


✅ Image localstack/localstack-docker-desktop:0.3.1 up-to-date.


✅ Image localstack/bigdata:latest up-to-date.


✅ Image localstack/lambda:nodejs14.x up-to-date.


✅ Image localstack/lambda:python3.9 up-to-date.


✅ Image localstack/lambda:provided.al2 up-to-date.


✅ Image localstack/lambda:java11 up-to-date.


✅ Image lambci/lambda:java11 up-to-date.


✅ Image lambci/lambda:java8.al2 up-to-date.


✅ Image lambci/lambda:ruby2.7 up-to-date.


✅ Image lambci/lambda:nodejs12.x up-to-date.


✅ Image lambci/lambda:java8 up-to-date.


✅ Image lambci/lambda:go1.x up-to-date.




Images updated: 0, Images failed: 2, total images processed: 41.

Expected behavior

Just pull existing and non-deprecated images. See localstack/localstack#8178 for details.

Screenshots

Screenshot 2023-04-28 at 09 39 53

Additional context

Architecture suffix
Images with an architecture suffix (e.g., -x86_64) can be removed because multi-architecture manifests use the same image name rather than suffixes.

Architecture sidenote
On ARM macs supporting x86_64 emulation, downloading all Lambda images might fetch a lot of arm64 images although Lambda mostly runs on emulated x86_64 unless deploying arm64 Lambdas specifically or setting LAMBDA_IGNORE_ARCHITECTURE=1.

nit: Preview only shows a subset
Screenshot 2023-04-28 at 09 47 50

References

Mac OSX Intel Getting "Mounts denied" on install

Describe the bug

In Docker Desktop I click Install. After a few seconds I get an error. Full text below.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Docker Desktop
  2. Search for Localstack
  3. Click on Install
  4. See error

Expected behavior

Extension should be installed correctly.

Screenshots

If applicable, add screenshots to help explain your problem.
image

Additional context

I tried adding path to file sharing.
Path doesn't actually exist in MacOS.

Full text of error:

Failed to install extension: installation could not be completed due to: executing '/Applications/Docker.app/Contents/Resources/bin/docker --context desktop-linux compose -p localstack_localstack-docker-desktop-desktop-extension -f extensions/localstack_localstack-docker-desktop/vm/docker-compose.yaml up -d' : exit status 1: Network localstack_localstack-docker-desktop-desktop-extension_default Creating Network localstack_localstack-docker-desktop-desktop-extension_default Created Volume "localstack_localstack-docker-desktop-desktop-extension_ls_app_config" Creating Volume "localstack_localstack-docker-desktop-desktop-extension_ls_app_config" Created Container localstack_localstack-docker-desktop-desktop-extension-service Creating Container localstack_localstack-docker-desktop-desktop-extension-service Created Container localstack_localstack-docker-desktop-desktop-extension-service Starting Error response from daemon: Mounts denied: The path /run/guest-services/localstack_localstack-docker-desktop is not shared from OS X and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info. .

References

LocalStack with Docker Desktop wont start

LocalStack with Docker Desktop wont start

Env:
Tried on 2 Macbook Pros (Apple chip and Intel chip)
Steps to reproduce:

Installed localstack extension for Docker Desktop.
2.Clicked on Start. And am seeing the error below:
2023-04-19T04:34:20.538 INFO --- [-functhread1] localstack.utils.threads : Thread run method <function Server.do_start_thread.._run at 0xffff8a4683a0>(None) failed: Traceback (most recent call last): File "/opt/code/localstack/.venv/lib/python3.10/site-packages/docker/api/client.py", line 268, in _raise_for_status response.raise_for_status() File "/opt/code/localstack/.venv/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http+docker://localhost/v1.41/containers/create?name=localstack_main The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 613, in create_container container = create_container() File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 594, in create_container return self.client().containers.create( File "/opt/code/localstack/.venv/lib/python3.10/site-packages/docker/models/containers.py", line 906, in create resp = self.client.api.create_container(**create_kwargs) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/docker/api/container.py", line 431, in create_container return self.create_container_from_config(config, name, platform) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/docker/api/container.py", line 448, in create_container_from_config return self._result(res, True) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/docker/api/client.py", line 274, in _result self._raise_for_status(response) File "/opt/code/localstack/.venv/lib/python3.10/site-packages/docker/api/client.py", line 270, in _raise_for_status raise create_api_error_from_http_exception(e) from e File "/opt/code/localstack/.venv/lib/python3.10/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception raise cls(e, response=response, explanation=explanation) from e docker.errors.APIError: 409 Client Error for http+docker://localhost/v1.41/containers/create?name=localstack_main: Conflict ("Conflict. The container name "/localstack_main" is already in use by container "9d65f950461eeb8a86b986ef8626392372b66c82d36cd5cfc12baa64af18099a". You have to remove (or rename) that container to be able to reuse that name.") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/opt/code/localstack/localstack/utils/threads.py", line 58, in run result = self.func(self.params, **kwargs) File "/opt/code/localstack/localstack/utils/serving.py", line 168, in _run return self.do_run() File "/opt/code/localstack/localstack/utils/bootstrap.py", line 475, in do_run return self.container.run() File "/opt/code/localstack/localstack/utils/bootstrap.py", line 407, in run return DOCKER_CLIENT.run_container( File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 661, in run_container container = self.create_container( File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 621, in create_container raise ContainerException() from e localstack.utils.container_utils.container_client.ContainerException
/

Add support for multiple instances

Summary

Add support for multiple instances

Requirements

The extension need to allow user to switch between different instances and start/stop them

Expected Behaviour

Add a dropdown select for selecting an instance

Possible small improvements

Small things that I noticed while using the extensions:

  1. During the update, it mentions an image was updated. It's really hard to see which one. Can it be more distinguished?
    image

  2. Can we provide a list of the images that will be updated? Put them in bold for easier reading, and change the color of the text from gray to white? It's not very readable.
    image

  3. Make the values in Variable field always in uppercase.
    Why is there no option to edit (modify) previously assigned variables and their values? I think this was previously possible.
    image20

  4. Can this be hidden?
    image

  5. The State is not updated from Stopped to Running.
    image

LocalStack was unable to run after update to 0.5.2

Describe the bug

After updating LocalStack extension to 0.5.2 version, the folowing message apears on Docker Desktop notifications:

ERROR --- [-functhread2] localstack.utils.bootstrap : Error while creating container: Error during the communication with the docker daemon ?

Steps to Reproduce

Steps to reproduce the behavior:

  1. Just update the extension via extension manager on Docker Desktop

##Terminal on localstack container
2024-01-03 18:14:40
2024-01-03 18:14:40 __ _______ __ __
2024-01-03 18:14:40 / / ____ _________ / / // /_ / /
2024-01-03 18:14:40 / / / __ / / __ / /\__ \/ __/ __ / / ///
2024-01-03 18:14:40 / /
/ /
/ / /
/ /
/ / /
/ / // // / // ,<
2024-01-03 18:14:40 /
/_/___/_
,////_/_,/___//|_|
2024-01-03 18:14:40
2024-01-03 18:14:40 💻 LocalStack CLI 3.0.3.dev
2024-01-03 18:14:40 👤 Profile: default
2024-01-03 18:14:40
2024-01-03 18:14:40 [21:14:40] starting LocalStack in Docker mode 🐳 localstack.py:494
2024-01-03 18:14:40 preparing environment bootstrap.py:1241
2024-01-03 18:14:41 [21:14:41] configuring container bootstrap.py:1249
2024-01-03 18:14:41 starting container bootstrap.py:1259
2024-01-03 18:14:41 2024-01-03T21:14:41.860 WARN --- [-functhread2] l.u.c.container_client : Host part of port mappings are ignored currently in additional flags
2024-01-03 18:14:41 2024-01-03T21:14:41.860 WARN --- [-functhread2] l.u.c.container_client : Host part of port mappings are ignored currently in additional flags
2024-01-03 18:14:41 2024-01-03T21:14:41.865 ERROR --- [-functhread2] localstack.utils.bootstrap : Error while creating container: Error during the communication with the docker daemon
2024-01-03 18:14:41 ?
2024-01-03 18:14:41 2024-01-03T21:14:41.869 INFO --- [-functhread2] localstack.utils.threads : Thread run method <function Server.do_start_thread.._run at 0x7f277a901440>(None) failed: Traceback (most recent call last):
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/client.py", line 268, in _raise_for_status
2024-01-03 18:14:41 response.raise_for_status()
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
2024-01-03 18:14:41 raise HTTPError(http_error_msg, response=self)
2024-01-03 18:14:41 requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.43/containers/create?name=localstack-main
2024-01-03 18:14:41
2024-01-03 18:14:41 The above exception was the direct cause of the following exception:
2024-01-03 18:14:41
2024-01-03 18:14:41 Traceback (most recent call last):
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 693, in create_container
2024-01-03 18:14:41 container = create_container()
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 674, in create_container
2024-01-03 18:14:41 return self.client().containers.create(
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/models/containers.py", line 917, in create
2024-01-03 18:14:41 resp = self.client.api.create_container(**create_kwargs)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/container.py", line 431, in create_container
2024-01-03 18:14:41 return self.create_container_from_config(config, name, platform)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/container.py", line 448, in create_container_from_config
2024-01-03 18:14:41 return self._result(res, True)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/client.py", line 274, in _result
2024-01-03 18:14:41 self._raise_for_status(response)
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/client.py", line 270, in _raise_for_status
2024-01-03 18:14:41 raise create_api_error_from_http_exception(e) from e
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
2024-01-03 18:14:41 raise cls(e, response=response, explanation=explanation) from e
2024-01-03 18:14:41 docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.43/containers/create?name=localstack-main: Internal Server Error ("b'/opt/code/localstack/\\wsl$\Ubuntu\home\/.cache/localstack-cli/machine.json%!(EXTRA string=is not a valid Windows path)'")
2024-01-03 18:14:41
2024-01-03 18:14:41 The above exception was the direct cause of the following exception:
2024-01-03 18:14:41
2024-01-03 18:14:41 Traceback (most recent call last):
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/threads.py", line 58, in run
2024-01-03 18:14:41 result = self.func(self.params, **kwargs)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/serving.py", line 168, in _run
2024-01-03 18:14:41 return self.do_run()
2024-01-03 18:14:41 ^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/bootstrap.py", line 1058, in do_run
2024-01-03 18:14:41 self.container = self.container.start(attach=False)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/bootstrap.py", line 825, in start
2024-01-03 18:14:41 id = self.container_client.create_container_from_config(cfg)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/container_client.py", line 806, in create_container_from_config
2024-01-03 18:14:41 return self.create_container(
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 702, in create_container
2024-01-03 18:14:41 raise ContainerException() from e
2024-01-03 18:14:41 localstack.utils.container_utils.container_client.ContainerException
2024-01-03 18:14:41

Additional context

Docker Desktop v4.26.1 (131620) on WSL2 with Ubuntu integration;
Windows 10 Pro v22h2 OS Build 19045.3803
Windows 11 Pro v22H2 OS build 22621.2861

LocalStack Extension on DOcker v0.5.2
Images:
localstack/localstack:latest - cc3241b4ebd5
localstack/localstack-docker-desktop:0.5.2 - 544b4cf660ba

References

LocalStack extension dashboard UI is broken

Describe the bug

LocalStack extension dashboard top menu UI is broken inside Docker desktop application.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to Extension once you launch Docker desktop
  2. Click on LocalStack extension
    you will see UI is broken

Expected behavior

Button and top menu should display clearly.

Screenshots

Screenshot 2023-11-15 at 1 59 55 PM

Additional context

Using MacBook Pro ( macOS ventura )

References

Issues in the UI

Few issues I have noticed:

  • logs are not properly showed.
    2022_10_27_Docker_Desktop_10_49_57_362

  • System Status is not automatically refreshed. I see that 'Stopped' is changed to 'Running'. Might be good to update the page as well.
    2022_10_27_Docker_Desktop_10_47_26_358

  • Only one custom configuration profile is available. It gets overwritten by creating new profiles.
    2022_10_27_Docker_Desktop_10_54_16_364

  • Profiles are deleted and are not available after the Docker Desktop is closed.
    Profiles are deleted when you switch from the extension tab to another tab. (i.e., switch to Containers)
    2022_10_27_Docker_Desktop_10_58_22_366

  • Environment variables set in the configuration profile are not provided to the container.
    Create profile test
    Add variable, for example DEBUG=1
    Select the profile test
    Start LocalStack
    Inspect the LocalStack container for the DEBUG env var.
    2022_10_27_Docker_Desktop_11_02_24_368

  • If you already have a stopped container in the Docker, when you click Start, nothing happens. No warning message.
    2022_10_27_Docker_Desktop_11_08_43_371

Lambda function created with localstack docker extension fail to resolve docker host address

Describe the bug

When I create a Lamdba function with localstack docker extension, the function is not able to resolve docker host address host.docker.internal. The error returned in Lambda function is Error: getaddrinfo EAI_AGAIN host.docker.internal.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a Lambda function which calls host.docker.internal
  2. It fails to call host.docker.internal with fail to resolve address error

Expected behavior

The same lambda function is working with localstack created with docker-compose and should be able to resolve host.docker.internal.

Issues in the UI (v0.2.0)

I have uninstalled the extension and installed it again with this command:
docker extension install localstack/localstack-docker-desktop:0.2.0

This is a list of issues I noticed while using it.

Adding Environment variable:
2022_12_20_Docker_Desktop_11_26_48_504

  1. The possible UX issues are with steps 2 and 3. Because I am only adding one new variable, I expect that I will be able to click Save & Exit to automatically save it. This does not occur, and the variable is discarded. You have to click the + button before you can use the Save & Exit button.

Main Dashboard:
2022_12_20_Docker_Desktop_11_19_55_502

  1. Missing our LocalStack logo. There is a possible issue with Docker's branding and design for the extension?
  2. I do not understand why the button is white. It is difficult to read, and the Web App name is not very useful for naming. I would suggest using something like this: app.localstack.cloud, LocalStack Web Application, LocalStack Web Dashboard.
  3. Does this environment variable need to be set for each profile? I'm not sure whether I should copy it or ignore it. Could we provide some explanation or documentation on how to set the profiles correctly?
    Wouldn't it be easier to share the profile if we used the same location for both the LocalStack CLI and the extension?
  4. The Update button should be renamed or removed, if possible. I would at least provide a mouseover description that specifies what it updates, or alternatively, name it something like Update LocalStack Images. Since this is a GUI, I would expect a confirmation window with a list of the images that will be updated.
  5. When the Start button is clicked, it does not provide a response. I am not aware whether the LocalStack application is starting or not. I would expect some sort of loading circle/line or other UI option to show that something is happening.
  6. Red Stopped is shown even if the LocalStack image is running. It should be updated to reflect the latest state of the LocalStack application.

No logs, even if LocalStack is running:
2022_12_20_Docker_Desktop_11_30_51_505

  1. The logs were not visible even though LocalStack was running.

Can't install on MacOS

Click install button but can't install.

Docker Desktop ver: 4.16.1

Failed to install extension: the local image you are trying to install has been modified and is different from the published image localstack/localstack-docker-desktop:0.3.1
 $ sw_vers
ProductName:    macOS
ProductVersion: 12.6.1
BuildVersion:   21G217

image
image

How to use this repo with Dockerfile.

Describe the bug

A clear and concise description of what the bug is.
Hi, according to readme, I can use make install extension to install extension; but I don't even know I have installed make to do this.

Steps to Reproduce

Steps to reproduce the behavior:

  1. From Docker Desktop (v4.24.0), I can enable Localstack extension for docker.
  2. I tried to launch Localstack extension for docker, but it shows stopped.
  3. I wrote one Dockerfile, try to install localstack extension; but when I built the docker image, I have issue, built failed.
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.
I should be able to build a docker image from the Dockerfile.

Screenshots

I show you the screenshots on Docker Desktop

Additional context

Output in DOS command:
D:\docker\localstack-ext>docker extension install localstack/localstack-docker-desktop:0.3.1
Extensions can install binaries, invoke commands, access files on your machine and connect to remote URLs.
Are you sure you want to continue? [y/N] y
installation could not be completed due to: the extension localstack/localstack-docker-desktop:0.3.1 is already installed

D:\docker\localstack-ext>make install extension
make: *** No rule to make target 'install'. Stop.

D:\docker\localstack-ext>docker build -t localstack-ext .
[+] Building 4.8s (6/6) FINISHED docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 171B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:latest 1.1s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> CACHED [1/2] FROM docker.io/library/ubuntu:latest@sha256:9b8dec3bf938bc80fbe758d856e96fdfab5f56c39d44b0cff351e847bb1b01ea 0.0s
=> ERROR [2/2] RUN apt-get update && apt-get install -y localstack-docker-extension vi openssl 3.6s

[2/2] RUN apt-get update && apt-get install -y localstack-docker-extension vi openssl:
0.392 Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
0.392 Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
0.550 Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
0.578 Get:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1081 kB]
0.588 Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
0.646 Get:6 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
0.710 Get:7 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
0.717 Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
0.736 Get:9 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1004 kB]
0.777 Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1226 kB]
0.833 Get:11 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.0 kB]
1.242 Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
1.287 Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1269 kB]
1.324 Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1347 kB]
1.360 Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1252 kB]
1.393 Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [49.8 kB]
1.456 Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [28.1 kB]
1.520 Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [50.4 kB]
1.944 Fetched 27.7 MB in 2s (17.0 MB/s)
1.944 Reading package lists...
2.654 Reading package lists...
3.340 Building dependency tree...
3.512 Reading state information...
3.517 E: Unable to locate package localstack-docker-extension
3.517 E: Unable to locate package vi


Dockerfile:3

1 | FROM ubuntu:latest
2 |
3 | >>> RUN apt-get update && apt-get install -y localstack-docker-extension vi openssl
4 |
5 | ENTRYPOINT ["localstack"]

ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y localstack-docker-extension vi openssl" did not complete successfully: exit code: 100

D:\docker\localstack-ext>type Dockerfile
FROM ubuntu:latest

RUN apt-get update && apt-get install -y localstack-docker-extension vi openssl

ENTRYPOINT ["localstack"]

D:\docker\localstack-ext> => My goal is to build one docker image with this extension, so I can launch it, and login to the docker container, and test some AWS functions, like create DynamoDB and run some CRUD operations. But if I can do this, I can test other AWS services in my local Windows 10 PC.
Please advise how can I do this? If I made mistake in the Dockerfile, show me a correct one. The issue is: I can enable this extension from Docker desktop, but when I run it, it stopped.
LocalstackDockerExtension

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.