-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Docs: Improve the usability and security of Docker on Unix #8432
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
# Creating your site | ||
|
||
After you've [installed] Material for MkDocs, you can bootstrap your project | ||
documentation using the `mkdocs` executable. Go to the directory where you want | ||
your project to be located and enter: | ||
After you've [installed] Material for MkDocs, you can bootstrap your documentation project then preview your documentation and finaly build your site using the `mkdocs` executable. | ||
|
||
## Bootstrap your project | ||
|
||
Go to the directory where you want your project to be located and enter: | ||
|
||
``` | ||
mkdocs new . | ||
``` | ||
|
||
Alternatively, if you're running Material for MkDocs from within Docker, use: | ||
|
||
=== "Unix, Powershell" | ||
|
||
=== "Unix" | ||
|
||
``` | ||
docker run --rm \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please format this as:
|
||
--user $(id -u):$(id -g) \ | ||
--volume $(pwd):/docs \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you remove |
||
squidfunk/mkdocs-material \ | ||
new . # bootstrap project | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove the comment, this is not necessary, as it's described in the paragraph above. |
||
``` | ||
|
||
=== "Powershell" | ||
|
||
``` | ||
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material new . | ||
|
@@ -210,7 +223,18 @@ mkdocs serve # (1)! | |
|
||
If you're running Material for MkDocs from within Docker, use: | ||
|
||
=== "Unix, Powershell" | ||
=== "Unix" | ||
|
||
``` | ||
docker run --rm \ | ||
--user $(id -u):$(id -g) \ | ||
--volume $(pwd):/docs \ | ||
--publish 127.0.0.1:8000:8000 \ | ||
squidfunk/mkdocs-material | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above. |
||
# serve by default (Ctrl + C to stop preview server) | ||
``` | ||
|
||
=== "Powershell" | ||
|
||
``` | ||
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material | ||
|
@@ -241,7 +265,17 @@ mkdocs build | |
|
||
If you're running Material for MkDocs from within Docker, use: | ||
|
||
=== "Unix, Powershell" | ||
=== "Unix" | ||
|
||
``` | ||
docker run --rm \ | ||
--user $(id -u):$(id -g) \ | ||
--volume $(pwd):/docs \ | ||
squidfunk/mkdocs-material \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above. |
||
build # build static site in $(pwd)/site | ||
``` | ||
|
||
=== "Powershell" | ||
|
||
``` | ||
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material build | ||
|
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.
Could you explain why this change is necessary? It doesn't have anything to do with what you described in your PR.