-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
refactor: quickstart.yml #2086
refactor: quickstart.yml #2086
Conversation
This command would fail without 'serve' in front. Fixing it however does not affect anything, therefore, removing it for better clarity.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! However, I think that the config is needed for the migration. Unless this causes a bug I think we should keep it :)
Add 'serve' to command for successful command execution in container.
@@ -13,7 +13,7 @@ services: | |||
- type: bind | |||
source: ./contrib/quickstart/kratos/email-password | |||
target: /etc/config/kratos | |||
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes | |||
command: serve -c /etc/config/kratos/kratos.yml migrate sql -e --yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command written there is correct. serve ... migrate
is not a valid command, and it will fail. What problem are you encountering or trying to solve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies in advance, I'm a new user and I was following the guide at https://www.ory.sh/kratos/docs/guides/docker/ to spin up a docker instance. My objective was merely to successfully spin up an instance.
Using that link as reference I tried to run this code in powershell
docker run `
-it `
-e DSN="memory" `
--mount type=bind,source="$(pwd)",target=/etc/config/kratos `
oryd/kratos:latest-sqlite `
--config /etc/config/kratos/kratos.yml
The output was
Error: unknown flag: --config
Usage:
kratos [command]
Available Commands:
completion generate the autocompletion script for the specified shell
courier Commands related to the Ory Kratos message courier
hashers This command contains helpers around hashing
help Help about any command
identities Tools to interact with remote identities
jsonnet Helpers for linting and formatting JSONNet code
migrate Various migration helpers
remote Helpers and management for remote Ory Kratos instances
serve Run the Ory Kratos server
version Show the build version, build time, and git hash
Flags:
-h, --help help for kratos
Use "kratos [command] --help" for more information about a command.
unknown flag: --config
Then I referred quickstart.yml trying to find a working code. Noticed line 41 had a 'serve' and I successfully spin up an instance as well
docker run `
-it `
-e DSN="memory" `
--mount type=bind,source="$(pwd)",target=/etc/config/kratos `
oryd/kratos:v0.8.0-alpha.3-sqlite `
serve --config /etc/config/kratos/kratos.yml
And then I wrongly assumed line 16 was wrong based on my experience and made this pull request, my apologies. I was confused by this inconsistency of commands between two supposedly similar docker images. I ran the serve ... migrate
code and indeed it gave an 'unknown shorthand 'e' in -e' error.
I checked the image history of oryd/kratos:latest-sqlite with docker desktop and verified it had CMD ['serve'] during image build so I'm still confused why I was required to manually put the 'serve' command during docker run. Regardless, you can close this and maybe update that docker doc guide to have others avoid my experience. Thanks! :) |
Oh wow, the page at https://www.ory.sh/kratos/docs/guides/docker/ is quite outdated! In general it's not a good idea to run |
This command would fail without 'serve' in front. Fixing it however does not affect anything, therefore, removing it for better clarity.
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security. vulnerability, I
confirm that I got green light (please contact
[email protected]) from the maintainers to push
the changes.
works.
Further Comments