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

docs: fix 'Invalid filename' issue in 'Fast Start' guide #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abiriadev
Copy link

Please refer to #63.

Changes

  • Instruct users to copy the SQL script before running sqlcmd.
  • Use docker compose cp instead of docker cp to avoid needing a container ID.
  • Remove unnecessary shell access instructions(exec -it bash).

I suggest updating the PDF guide to mirror these changes for consistency. Unfortunately, I'm unsure how to update it. If there's something that I can do, please let me know.

Regards.

- Instruct users to copy the SQL script before running `sqlcmd`.
- Use `docker compose cp` instead of `docker cp` to avoid needing a container ID.
- Remove unnecessary shell access instructions(`exec -it bash`).

Refs: gs1#63
@@ -563,13 +563,12 @@ We recommend the following software to use when getting to know GS1 Resolver and

8. Now wait 10 seconds while the system settles down (the SQL Server service takes a few seconds to initialise when '
new') then, if you have SQL Server Management Studio installed, go to Step 9, else copy and paste this command which
will cause you to enter the container and access its terminal prompt:<pre>docker exec -it resolver-sql-server bash</pre>
Now run this command which will create the database and some example data:<pre>/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P its@SECR3T! -i /gs1resolver_sql_scripts/sqldb_create_script.sql </pre>
will copy the initialization SQL script into the database container:<pre>docker compose cp ./resolver_sql_server/sqldb_create_script.sql sql-server:sqldb_create_script.sql</pre>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this didn;t work for me but this did.

docker cp ./resolver_sql_server/sqldb_create_script.sql resolver-sql-server:sqldb_create_script.sql

Copy link
Author

@abiriadev abiriadev Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paulfdietrich can you show me the exact error message? I think you should install docker compose v2.

Compose V2 integrates compose functions into the Docker platform, continuing to support most of the previous docker-compose features and flags. You can run Compose V2 by replacing the hyphen (-) with a space, using docker compose, instead of docker-compose.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great newbie test. I've never used docker-compose and only use docker occasionally.

docker-compose version 1.25.0, build unknown

Looks like this version doesn't have a 'cp' command. I installed it via

I tried this slightly modified version of your command (added the hyphen in docker-compose).

docker-compose cp ./resolver_sql_server/sqldb_create_script.sql sql-server:sqldb_create_script.sql
/usr/lib/python3/dist-packages/paramiko/transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
No such command: cp

sudo apt install docker-compose

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like docker compose cp is only supported in compose v2(the one without -) or highter: https://www.docker.com/blog/announcing-compose-v2-general-availability/

will cause you to enter the container and access its terminal prompt:<pre>docker exec -it resolver-sql-server bash</pre>
Now run this command which will create the database and some example data:<pre>/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P its@SECR3T! -i /gs1resolver_sql_scripts/sqldb_create_script.sql </pre>
will copy the initialization SQL script into the database container:<pre>docker compose cp ./resolver_sql_server/sqldb_create_script.sql sql-server:sqldb_create_script.sql</pre>
Now run this command which will create the database and some example data:<pre>docker compose exec sql-server /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P its@SECR3T! -i /sqldb_create_script.sql</pre>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this worked for me as

docker exec resolver-sql-server /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P its@SECR3T! -i /sqldb_create_script.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants