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

improve documentation how to start, how to connect Docker with my Repository #237

Open
aisbergde opened this issue May 11, 2020 · 3 comments
Labels
help wanted Extra attention is needed pull request wanted

Comments

@aisbergde
Copy link

I want to try this app on my SQL Server databases. So I tried to follow the readme.md instruction. I never before used Docker. But why not to use it.

I installed docker desktop for Windows => OK

I called docker pull k1low/tbls:latest in a command line => OK, something happened, something was downloaded, But I don't understand what happens when I call this command. A short explanation in the readme would be helpful.

Add .tbls.yml ( or tbls.yml ) file to your repository.

My understanding: I should create an empty git repository and in this repo I should create the file?
I created an empty git repository on the place where all my repos are located. But Docker will not know this place.

Run tbls doc

If I run in the folder where I created the repository the "tbls" is not found.
if I run this where I called the docker pull k1low/tbls:latest then there is no information where the repository is located.

So please explain in the documentation a little bit, how I should the Docker tell which repository to use.

BTW, when I want to document MS SQL Server, did tbls only support user+password or also integrated security? If yes, how?

@aisbergde aisbergde added the enhancement New feature or request label May 11, 2020
@k1LoW k1LoW added help wanted Extra attention is needed pull request wanted and removed enhancement New feature or request labels May 12, 2020
@anguschiu1
Copy link

Hi @aisbergde if you just run tbls CLI through docker, the steps are:

  1. docker pull ghcr.io/k1low/tbls:latest
  2. docker run k1low/tbls doc sqlserver://DbUser:SQLServer-DbPassw0rd@hostname:1433/testdb

In step 1, you pulled latest docker images from ghcr.io/k1low/tbls to your machine. You can also see what docker images you have in your local machine by docker images.

Then in step 2, you use docker run k1low/tbls command to run the doc command in containerized application k1low/tbls.

@NilkOne
Copy link

NilkOne commented Feb 15, 2022

Hello,
How to params the query connection ?

User: bob
Password: secret
Server #1 Host: SRV-DEV-TEST
Server #2 Host: localhost
Server#2 with instance name : SQL_ABC_19

Connection to Server #1 :

docker run ghcr.io/k1low/tbls doc sqlserver://bob:secret@SRV-DEV-TEST:1433

invalid DSN: parse sqlserver://bob:secret@SRV-DEV-TEST:1433 -> &dburl.URL{URL:url.URL{Scheme:"sqlserver", Opaque:"", User:(*url.Userinfo)(0xc0004bc180), Host:"SRV-DEV-TEST:1433", Path:"", RawPath:"", ForceQuery:false, RawQuery:"", Fragment:"", RawFragment:""}, OriginalScheme:"sqlserver", Transport:"tcp", Driver:"sqlserver", Unaliased:"sqlserver", DSN:"Password=secret;Port=1433;Server=SRV-DEV-TEST;User ID=bob", hostPortDB:[]string{"SRV-DEV-TEST", "1433", ""}}

Connection to Server #2 :

docker run ghcr.io/k1low/tbls doc sqlserver://bob:secret@localhost:1433/SQL_ABC_19

C:\Users\kevin>docker run ghcr.io/k1low/tbls doc sqlserver://bob:secret@localhost:1433/SQL_ABC_19
unable to open tcp connection with host 'localhost:1433': dial tcp 127.0.0.1:1433: connect: connection refused

I precise that I can connect to servers by using SQL Service Management Studio

@k1LoW
Copy link
Owner

k1LoW commented Feb 16, 2022

tbls run by docker run ghcr.io/k1low/tbls doc will run inside a docker container. In other words, the connection destination setting is different from the host.
The above is due to the way Docker works, so unfortunately we cannot support it here.

If possible, please try to install and run tbls directly on the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed pull request wanted
Projects
None yet
Development

No branches or pull requests

4 participants