Skip to content
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

Add Dockerfile to get the tokens #35

Merged
merged 11 commits into from Feb 10, 2023
Merged

Add Dockerfile to get the tokens #35

merged 11 commits into from Feb 10, 2023

Conversation

DavidDeSloovere
Copy link
Contributor

@DavidDeSloovere DavidDeSloovere commented Sep 12, 2022

#33
Most of this is generated. Readme got automatically formatted after I changed the content.

I was able to build and the container successfully in VS Code.

The next step would be to build the container in a Github action a publish it to either your repo's Artifacts or official Docker hub. I have done that recently in my own project.

I wonder if this should go into a separate repo.

@Chouffy
Copy link
Owner

Chouffy commented Sep 14, 2022

Hey @DavidDeSloovere , thanks a lot for your PR! It sounds really great and I appreciate the time and effort you put into this.
However I'm out of any computer for the next few months and I would like to test it before merging.
Do you mind to wait a bit?

@Chouffy
Copy link
Owner

Chouffy commented Sep 14, 2022

@maartenhendrix : do you think you could give me a help here, if you want and can?

@maartenhendrix
Copy link
Collaborator

I'm not sure if I can. Also not near a computer for some time 😬

@DavidDeSloovere
Copy link
Contributor Author

Update for latest version.

@Chouffy
Copy link
Owner

Chouffy commented Feb 6, 2023

Hey @DavidDeSloovere thanks for updating this!
Few questions as I'm not experienced in Docker:

  • Is it expected that there's docker build docker build on this line
  • Do we have to use the homeassistant_tgtg_tokens tag? is it a docker tar or a git branch? #noobhere

@DavidDeSloovere
Copy link
Contributor Author

Only 1 docker build is required. Good catch!

In homeassistant_tgtg_tokens:latest, homeassistant_tgtg_tokens is the name of the image and latest is the tag. Better to name it explicitly, I vaguely recall that otherwise it uses the github repo name, which could change. If you want to use home_assistant_tgtg_tokens, that's fine also. It's just the local image. As there is no push to the docker registry (for now). If you push from github to docke registry, then people would not need to build the image locally.

Had merge conflicts on readme, I can work with git (somewhat), but not experienced with github flow, forks etc... so hope I didn't make it worse.

@tjorim
Copy link
Collaborator

tjorim commented Feb 10, 2023

LGTM, it would be nice to add a pre-built docker image.
It should be possible to build and host it here with some GitHub Actions.
For now, this is already an improvement IMO.

@tjorim tjorim linked an issue Feb 10, 2023 that may be closed by this pull request
@tjorim tjorim added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 10, 2023
@DavidDeSloovere
Copy link
Contributor Author

On another project I have a GH action that builds and uploads the image into the artifacts of the repo.
https://github.com/DavidDeSloovere/giphy-cli/blob/main/.github/workflows/publish.yml

Might be better in a separate PR.

@tjorim tjorim merged commit 2bb2abb into Chouffy:main Feb 10, 2023
@tjorim
Copy link
Collaborator

tjorim commented Feb 10, 2023

On another project I have a GH action that builds and uploads the image into the artifacts of the repo.
https://github.com/DavidDeSloovere/giphy-cli/blob/main/.github/workflows/publish.yml

Might be better in a separate PR.

Agreed, merged as first version.
Thanks for your contribution, @DavidDeSloovere!

@DasPflanze
Copy link

DasPflanze commented Apr 3, 2023

Hey everyone,
the provided solution to get the tokens with docker seems to be a bit bloated for only running one script. It took several minutes on my server to run it. On another issue I posted my way a ran the skript:
#72 (comment)
If you want some help I could try to write everything into a dockerfile, so you only have to build and run it.

Edit:
Ignore what I wrote. To get it running faster you only need to change the Python Version from 3.8 to 3.9. As I found out in #72 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker container for tgtg_get_tokens
5 participants