-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
please add docker support #61
Comments
Ok |
One note on thus far: when attempting to install and run this package in my own Docker container (and run it manually), I get this error (relating to the config file stored in a Docker volume):
That |
I will increase the priority of this issue to include it in release 1.2.0 |
Thanks, @Nekmo! I have a good amount of experience in Dockerizing apps like yours, so if I may be of assistance, let me know! |
Thank you @bachya! Can you do a pull request please? I don't have so much experience with docker. |
You got it – once I have this running in a stable Docker, I’ll do a PR. |
@Nekmo Starting down the road – you can find a simple, early Dockerfile in my fork: https://github.com/bachya/amazon-dash/blob/docker/Dockerfile However, there are complications. No matter what configuration I use, I can't get my Dash Button to register. Hard to tell where the issue is – could be I'd love some help in testing (so that we can narrow down where the issue is). If you install Docker (available via most package managers), clone my fork,
...you should get a functioning container that immediately runs Other variants of the
If you can run these and tell me your results, we can narrow down whether the issues exists in my networking or within the Docker setup. |
@bachya there is an option to choose the network interface in Amazon-dash. Maybe this option can help you. https://github.com/Nekmo/amazon-dash/blob/develop/amazon_dash/management.py#L121 related issue: #55 Thanks for your help |
After some testing, I'm able to sniff my devices when directly using |
Not sure whether it is of any help, but I just came across another Amazon Dash implementation on Docker Hub that is using scapy (successfully?): https://github.com/vwieczorek/amazon-dash-docker/blob/master/Dockerfile |
@davosian Appreciate the help. Unfortunately, that Dockerfile doesn't tell us anything about how he got the host networking interfacing with the container network (such that packet inspection becomes available). Continuing to dig. |
GOT IT. Preamble: as we might expect, we need a way for the container to access the host's network to do packet inspection. There are many "better" ways to do this, but the manner I'm going to suggest is to give the container the I was attempting to test this on my Mac. Took me way, way too long to learn that Once I tested my Dockerfile on a Linux host, what do you know, everything started working:
!!! So, long story short: we are unblocked and progressing |
I don't have so much experience in Docker to be able to help, I'm sorry. My efforts are now in Amazon-dash 2.0. If I have time I will look for documentation to help with this task. |
No worries, @Nekmo – I'm making good progress. I'll make sure to include instructions in my PR. |
@bachya Had I known... I ran into the |
@davosian No problem! I'm in very good shape: currently have HASS and amazon-dash running in separate containers, happy as clams. :) I'll publish a PR soon and would love to have you test! |
@davosian If you'd like to help test, I'm temporarily hosting the Docker image (until the official one gets up and running): https://hub.docker.com/r/bachya/amazon-dash/ |
@bachya the pull requests have been verified and accepted 👍 I have to check that it works. Thank you! |
I would like to test your docker image but am having a few issues:
Thanks! |
@susadmin Absolutely – put those instructions in the docs, but forgot to put them here for testing.
It can be placed anywhere; we will map it into the container below.
Can be called whatever you like.
|
There seems to be a problem. I have the app running fine in a docker container. It responds to the button press but then throws an error. Here is the log:
I can ping (my docker home assistant app) fine. With curl, this works: Here is my config.yml:
Do you have ideas on what is going wrong? |
@susadmin Does that configuration work when Amazon Dash is run outside of Docker? |
Yes, it works no problem |
The When you say you can ping the HASS container, is that from the Amazon Dash container? Are both using |
Yes, I am using My HASS container has its own dedicated lan ip I have setup with a macvlan network. The HASS container does not repsond to pings but the amazon-dash container does correctly resolve ip address if I test it through its shell. I am using the exact same amazon-dash.yml file in both container and standalone version. Standalone works fine. Update: I have done a little playing around with network settings and I find if I use Maybe there is something super sensitive with the network implementation? |
Very possible. Docker's networking options are vast, varied, and beyond me, so glad you got it working. |
Thanks for all your help! I am pretty new to docker and am in the process of converting as many of my apps as I can. It's a steep learning curve. I do think dockerising amazon-dash is a really good idea. Hopefully, it can be integrated with Nekmo's work. So please do let me know if there is anything I can do to help the cause. |
Network works for me in Linux without change config 👍 |
Yes, it works for me too in linux with no config change; it's just the netfig config of the docker container that is a bit finickity. |
Ok, I think everything is ready. Thanks to @bachya |
I can confirm that the docker container from nekmo is working fine in concert with my HASS container. I was using the following docker-compose file (@Nekmo feel free to include in the docker instructions):
To use this with docker, run Please note that I am mapping the config folder and not the Also please note: docker installation instructions are still missing from the manual pages: http://docs.nekmo.org/amazon-dash/installation.html |
Support for Docker is still experimental and is in the develop branch. The documentation will be updated with release 1.2.0 :) @davosian I will update with Dockerfile setting Python 3.7 and update the documentation. Thank you :) |
@Nekmo Not sure if you saw my note on the PR re: my managing the Docker Hub repo; let me know how you'd like to proceed? |
@bachya Yes I have seen your comment :) I need time to see how to add a co-owner. Sorry for the wait. |
@bachya As I understand it, I need to create an organization to add a co-owner. This is correct? |
@Nekmo I’m not sure that’s necessary. If you add me as a collaborator (under |
@bachya You are already a collaborator. Can you try? Thanks! :D |
Yes, got it! I'll start setting things up and will keep you posted. 👍 |
@Nekmo Just attempted to link a Docker job to this repo and got this message: "The repository name Have you already set up a Docker Hub account? |
@bachya I created nekmocom to do a test. I have added you as a co-owner in this test repository. |
What's the difference between these two? It looks like #1 is already set up and pretty much good to go? |
please add docker suport
The text was updated successfully, but these errors were encountered: